1 | <?php |
||
12 | class ServiceProvider extends BaseServiceProvider |
||
13 | { |
||
14 | /** |
||
15 | * Create a new service provider instance. |
||
16 | * |
||
17 | * @param Application $app |
||
18 | */ |
||
19 | public function __construct(Application $app) |
||
23 | |||
24 | /** |
||
25 | * Bootstrap the application services. |
||
26 | * |
||
27 | * @return void |
||
28 | */ |
||
29 | public function boot() |
||
35 | |||
36 | /** |
||
37 | * Register the application services. |
||
38 | * |
||
39 | * @return void |
||
40 | */ |
||
41 | public function register() |
||
45 | |||
46 | /** |
||
47 | * @return void |
||
48 | */ |
||
49 | protected function publishConfigs() |
||
55 | |||
56 | /** |
||
57 | * @return void |
||
58 | */ |
||
59 | protected function publishMigrations() |
||
70 | |||
71 | /** |
||
72 | * @return void |
||
73 | */ |
||
74 | protected function registerRouteBindings() |
||
78 | |||
79 | /** |
||
80 | * @return void |
||
81 | */ |
||
82 | protected function registerBindings() |
||
87 | } |
||
88 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: