Implement strict Eloquent when developing
This commit is contained in:
parent
5f82c82818
commit
3f4634710c
9 changed files with 19 additions and 15 deletions
|
@ -5,6 +5,7 @@ namespace App\Providers;
|
|||
use App\Models\Note;
|
||||
use App\Observers\NoteObserver;
|
||||
use Codebird\Codebird;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
|
@ -102,6 +103,9 @@ class AppServiceProvider extends ServiceProvider
|
|||
->forceAttribute('a', 'rel', 'noopener nofollow')
|
||||
);
|
||||
});
|
||||
|
||||
// Turn on Eloquent strict mode when developing
|
||||
Model::shouldBeStrict(! $this->app->isProduction());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue