123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- /*
- * This file is part of the Jiannei/lumen-api-starter.
- *
- * (c) Jiannei <longjian.huang@foxmail.com>
- *
- * This source file is subject to the MIT license that is bundled
- * with this source code in the file LICENSE.
- */
- namespace App\Providers;
- use Carbon\Carbon;
- use Illuminate\Support\Facades\App;
- use Illuminate\Support\ServiceProvider;
- class AppServiceProvider extends ServiceProvider
- {
- /**
- * Register any application services.
- */
- public function register()
- {
- }
- /**
- * Bootstrap any application services.
- *
- * @return void
- */
- public function boot()
- {
- if (App::getLocale() == 'zh_CN') {
- Carbon::setLocale('zh');
- }
- $this->registerObservers(); // 注册观察者
- }
- protected function registerObservers(): void
- {
- }
- }
|