| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function boot() |
||
| 13 | { |
||
| 14 | if ($this->app->runningInConsole()) { |
||
| 15 | $this->publishes([ |
||
| 16 | __DIR__.'/../config/cors.php' => config_path('cors.php'), |
||
| 17 | ], 'config'); |
||
| 18 | } |
||
| 19 | |||
| 20 | $configuredCorsProfile = config('cors.cors_profile'); |
||
| 21 | |||
| 22 | if (! is_a($configuredCorsProfile, DefaultProfile::class, true)) { |
||
| 23 | throw InvalidCorsProfile::profileDoesNotExtendDefaultProfile($configuredCorsProfile); |
||
| 24 | } |
||
| 25 | |||
| 26 | $this->app->bind(CorsProfile::class, $configuredCorsProfile); |
||
| 27 | } |
||
| 28 | |||
| 34 |