added eager load config
This commit is contained in:
parent
f1072f348f
commit
707207185b
@ -37,7 +37,7 @@ class App extends Provider
|
|||||||
|
|
||||||
Paginator::useBootstrap();
|
Paginator::useBootstrap();
|
||||||
|
|
||||||
Model::preventLazyLoading();
|
Model::preventLazyLoading(config('app.eager_load'));
|
||||||
|
|
||||||
Model::handleLazyLoadingViolationUsing(function ($model, $relation) {
|
Model::handleLazyLoadingViolationUsing(function ($model, $relation) {
|
||||||
$class = get_class($model);
|
$class = get_class($model);
|
||||||
|
@ -18,6 +18,8 @@ return [
|
|||||||
|
|
||||||
'schedule_time' => env('APP_SCHEDULE_TIME', '09:00'),
|
'schedule_time' => env('APP_SCHEDULE_TIME', '09:00'),
|
||||||
|
|
||||||
|
'eager_load' => (bool) env('APP_EAGER_LOAD', true),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application Environment
|
| Application Environment
|
||||||
|
Loading…
x
Reference in New Issue
Block a user