mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Load admin and model on assets
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
1c229a8e08
commit
71729f0b16
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue