예제 #1
0
 public static function getLocalizedCountryList(array $countries = null)
 {
     $locale = 'en';
     $app_locale = app_locale();
     if ($app_locale == 'cn') {
         $locale = 'zh';
     }
     return self::getCountryList($countries, $locale);
 }
예제 #2
0
    <meta name="keywords" content="laravel,restful,api,vue.js,vuejs"/>
    <meta name="description"
          content="Someline Starter is a framework for quick building Web Apps or APIs, with modern PHP design pattern foundation, which is built on top of popular Laravel 5 framework, Vue.js, Restful API, Repository Design, OAuth2, JWT, Unit Tests, isolated front-end and back-end layer."/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link rel="stylesheet" href="{{url(elixir("css/app.src.css"))}}" type="text/css"/>
    @stack('stylesheets')
    <script type="text/javascript">
        <?php 
$user = \Auth::user();
if ($user) {
    $user->setVisible(['user_id', 'name']);
    $user = $user->toArray();
} else {
    $user = new ArrayObject();
}
$data = ['locale' => app_locale(), 'baseUrl' => url('/'), 'state' => ['user' => $user]];
echo 'window.Someline = ' . json_encode($data);
?>
    </script>
    <script type="text/javascript">
        <?php 
$data = ['csrfToken' => csrf_token()];
echo 'window.Laravel = ' . json_encode($data);
?>
    </script>
</head>
<body>
<div id="app" class="app @yield('div.app.class')">

    @yield('app')