123456789101112131415161718192021222324252627282930 |
- <?php
- namespace App\Providers;
- use Illuminate\Support\ServiceProvider;
- class AppServiceProvider extends ServiceProvider
- {
- /**
- * Register any application services.
- */
- public function register(): void
- {
- //添加自定义辅助函数
- require_once __DIR__ . '/../Helpers/helpers.php';
- $this->app->singleton(MenuService::class, function ($app) {
- return new MenuService();
- });
- }
- /**
- * Bootstrap any application services.
- */
- public function boot(): void
- {
- //
- }
- }
|