Total Complexity | 8 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
||
11 | { |
||
12 | 14 | public function boot() |
|
13 | { |
||
14 | 14 | $this->registerRoutes(); |
|
15 | 14 | $this->listenMailHooks(); |
|
16 | |||
17 | 14 | if ($this->app->runningInConsole()) { |
|
18 | 14 | $this->registerMigrations(); |
|
19 | |||
20 | 14 | $this->publishes([ |
|
21 | 14 | __DIR__.'/../config/notification-tracker.php' => config_path('notification-tracker.php'), |
|
22 | 14 | ], 'config'); |
|
23 | |||
24 | |||
25 | 14 | $this->commands([ |
|
26 | 14 | // TODO: add truncate |
|
27 | 14 | ]); |
|
28 | } |
||
29 | } |
||
30 | |||
31 | 14 | public function register() |
|
34 | } |
||
35 | |||
36 | 14 | protected function registerMigrations() |
|
37 | { |
||
38 | 14 | if (NotificationTracker::$runsMigrations) { |
|
39 | 14 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
|
40 | } |
||
41 | } |
||
42 | |||
43 | 14 | protected function registerRoutes() |
|
44 | { |
||
45 | 14 | if (NotificationTracker::$registersRoutes) { |
|
46 | 14 | $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); |
|
47 | } |
||
48 | } |
||
49 | |||
50 | 14 | protected function listenMailHooks() |
|
54 | } |
||
55 | } |
||
56 |