feat(provider): aktifkan pemuatan relasi otomatis pada model
- Menambahkan pemanggilan Model::automaticallyEagerLoadRelationships() di metode boot. - Meningkatkan performa dengan mengoptimalkan pemuatan relasi model secara otomatis.
This commit is contained in:
parent
61f065ac8c
commit
179dab656c
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
@ -19,6 +20,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
Model::automaticallyEagerLoadRelationships();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user