AppServiceProvider.php (537B)
1 <?php 2 3 namespace App\Providers; 4 5 use Illuminate\Database\Eloquent\Model; 6 use Illuminate\Support\ServiceProvider; 7 8 class AppServiceProvider extends ServiceProvider 9 { 10 /** 11 * Register any application services. 12 */ 13 public function register(): void 14 { 15 // 16 } 17 18 /** 19 * Bootstrap any application services. 20 */ 21 public function boot(): void 22 { 23 Model::shouldBeStrict( 24 // It will only be enabled outside of production, though. 25 !app()->isProduction() 26 ); 27 } 28 }