diff --git a/app/Models/Asset.php b/app/Models/Asset.php index cddca9802c..54c011a4de 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -31,6 +31,7 @@ class Asset extends Depreciable { protected $presenter = AssetPresenter::class; + protected $with = ['model', 'admin']; use CompanyableTrait; use HasFactory, Loggable, Requestable, Presentable, SoftDeletes, ValidatingTrait, UniqueUndeletedTrait; @@ -716,7 +717,7 @@ class Asset extends Depreciable * @since [v1.0] * @return \Illuminate\Database\Eloquent\Relations\Relation */ - public function adminuser() + public function admin() { return $this->belongsTo(\App\Models\User::class, 'user_id'); }