Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
21 | class SecurityTxtServiceProvider extends \Illuminate\Support\ServiceProvider |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Indicates if loading of the provider is deferred. |
||
26 | * |
||
27 | * @var bool |
||
28 | */ |
||
29 | protected $defer = false; |
||
30 | |||
31 | /** |
||
32 | * Perform post-registration booting of services. |
||
33 | * |
||
34 | * @return void |
||
35 | */ |
||
36 | public function boot() |
||
37 | { |
||
38 | $this->publishes([ |
||
39 | __DIR__ . '/config/security-txt.php' => config_path('security-txt.php'), |
||
40 | ]); |
||
41 | |||
42 | if (!$this->app->routesAreCached()) |
||
43 | require __DIR__ . '/routes/security-txt.php'; |
||
44 | |||
45 | if (!defined('LARAVEL_SECURITY_TXT_VERSION')) |
||
46 | define('LARAVEL_SECURITY_TXT_VERSION', SecurityTxtHelper::VERSION); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Register the service provider. |
||
51 | * |
||
52 | * @return void |
||
53 | */ |
||
54 | public function register() |
||
62 | }); |
||
63 | } |
||
66 |