fixed contact media n+1 issue

This commit is contained in:
Cüneyt Şentürk 2023-05-31 10:02:11 +03:00
parent ece0c27972
commit d5ec767372

View File

@ -26,6 +26,13 @@ class Contact extends Model
protected $table = 'contacts'; protected $table = 'contacts';
/**
* The relationships that should always be loaded.
*
* @var array
*/
protected $with = ['media'];
/** /**
* The accessors to append to the model's array form. * The accessors to append to the model's array form.
* *