| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 1.0002 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | 10 | public function boot() |
|
| 17 | { |
||
| 18 | 10 | $this->publishes([ |
|
| 19 | 10 | __DIR__ . '/migrations/' => database_path('migrations') |
|
| 20 | 10 | ], 'migrations'); |
|
| 21 | |||
| 22 | 10 | $this->publishes([ |
|
| 23 | 10 | __DIR__.'/config/simple_roles.php' => config_path('simple_roles.php'), |
|
| 24 | 10 | ], 'config'); |
|
| 25 | |||
| 26 | 10 | $this->loadMigrationsFrom(__DIR__ . '/migrations'); |
|
| 27 | |||
| 28 | 10 | $this->mergeConfigFrom( |
|
| 29 | 10 | __DIR__.'/config/simple_roles.php', |
|
| 30 | 10 | 'simple_roles' |
|
| 31 | ); |
||
| 32 | |||
| 33 | 10 | Blade::if('role', function ($role) { |
|
| 34 | return optional(Auth::user())->hasRole($role); |
||
| 35 | 10 | }); |
|
| 36 | 10 | } |
|
| 37 | |||
| 48 |