diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 219f1ca0a4..8a4d4eed8b 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -21,8 +21,7 @@ use Illuminate\Notifications\Notifiable; class Asset extends Depreciable { protected $presenter = 'App\Presenters\AssetPresenter'; - use Loggable, Requestable, Presentable, Notifiable; - use SoftDeletes; + use Loggable, Requestable, Presentable, Notifiable, SoftDeletes, ValidatingTrait, UniqueUndeletedTrait; const LOCATION = 'location'; const ASSET = 'asset'; @@ -53,7 +52,6 @@ class Asset extends Depreciable ]; - use ValidatingTrait, UniqueUndeletedTrait; protected $rules = [ 'name' => 'max:255|nullable', @@ -95,6 +93,8 @@ class Asset extends Depreciable 'warranty_months', ]; + + public function getDisplayNameAttribute() { return $this->present()->name();