123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace App\Providers;
- use Illuminate\Support\ServiceProvider;
- use App\Http\Controllers\Demo\IndexController;
- use Illuminate\View\View;
- class AppServiceProvider extends ServiceProvider
- {
- /**
- * Bootstrap any application services.
- *
- * @return void
- */
- public function boot()
- {
- //
- $d=new IndexController();
- $nav=$d->tree();
- $foot=$d->foot();
- // dd($foot);
- // $foot=$foot->toArray();
- view()->share('foot',$foot);
- view()->share('nav',$nav);
- }
- /**
- * Register any application services.
- *
- * @return void
- */
- public function register()
- {
- //
- // 仅在开发环境中使用
- if ($this->app->environment() !== 'production') {
- $this->app->register(\Way\Generators\GeneratorsServiceProvider::class);
- $this->app->register(\Xethron\MigrationsGenerator\MigrationsGeneratorServiceProvider::class);
- }
- }
- }
|