Moved trait to single line

This commit is contained in:
snipe 2017-10-31 05:21:55 -07:00
parent 0f4c05c5d0
commit 0089f73686

View file

@ -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();