1 | <?php |
||
9 | class BaseServiceProvider extends ServiceProvider |
||
10 | { |
||
11 | protected $commands = [ |
||
12 | \Backpack\Base\app\Console\Commands\Install::class, |
||
13 | ]; |
||
14 | |||
15 | /** |
||
16 | * Indicates if loading of the provider is deferred. |
||
17 | * |
||
18 | * @var bool |
||
19 | */ |
||
20 | protected $defer = false; |
||
21 | |||
22 | /** |
||
23 | * Where the route file lives, both inside the package and in the app (if overwritten). |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | public $routeFilePath = '/routes/backpack/base.php'; |
||
28 | |||
29 | /** |
||
30 | * Perform post-registration booting of services. |
||
31 | * |
||
32 | * @return void |
||
33 | */ |
||
34 | public function boot(\Illuminate\Routing\Router $router) |
||
54 | |||
55 | /** |
||
56 | * Load the Backpack helper methods, for convenience. |
||
57 | */ |
||
58 | public function loadHelpers() |
||
62 | |||
63 | /** |
||
64 | * Define the routes for the application. |
||
65 | * |
||
66 | * @param \Illuminate\Routing\Router $router |
||
67 | * |
||
68 | * @return void |
||
69 | */ |
||
70 | public function setupRoutes(Router $router) |
||
82 | |||
83 | /** |
||
84 | * Register any package services. |
||
85 | * |
||
86 | * @return void |
||
87 | */ |
||
88 | public function register() |
||
89 | { |
||
90 | // register the current package |
||
91 | $this->app->bind('base', function ($app) { |
||
92 | return new Base($app); |
||
93 | }); |
||
94 | |||
95 | // register its dependencies |
||
96 | $this->app->register(\Jenssegers\Date\DateServiceProvider::class); |
||
97 | $this->app->register(\Prologue\Alerts\AlertsServiceProvider::class); |
||
98 | $this->app->register(\Creativeorange\Gravatar\GravatarServiceProvider::class); |
||
99 | |||
100 | // register their aliases |
||
101 | $loader = \Illuminate\Foundation\AliasLoader::getInstance(); |
||
102 | $loader->alias('Alert', \Prologue\Alerts\Facades\Alert::class); |
||
103 | $loader->alias('Date', \Jenssegers\Date\Date::class); |
||
104 | $loader->alias('Gravatar', \Creativeorange\Gravatar\Facades\Gravatar::class); |
||
105 | |||
106 | // register the services that are only used for development |
||
107 | if ($this->app->environment() == 'local') { |
||
108 | if (class_exists('Laracasts\Generators\GeneratorsServiceProvider')) { |
||
109 | $this->app->register('Laracasts\Generators\GeneratorsServiceProvider'); |
||
110 | } |
||
111 | if (class_exists('Backpack\Generators\GeneratorsServiceProvider')) { |
||
112 | $this->app->register('Backpack\Generators\GeneratorsServiceProvider'); |
||
113 | } |
||
114 | } |
||
115 | |||
116 | // register the artisan commands |
||
117 | $this->commands($this->commands); |
||
118 | } |
||
119 | |||
120 | public function registerAdminMiddleware(Router $router) |
||
124 | |||
125 | public function publishFiles() |
||
151 | } |
||
152 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.