item name initinals added

This commit is contained in:
Cihan Şentürk 2022-06-21 10:00:20 +03:00 committed by GitHub
parent 64475adcc4
commit cab19d691f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ namespace App\Models\Common;
use App\Abstracts\Model; use App\Abstracts\Model;
use App\Models\Document\Document; use App\Models\Document\Document;
use App\Utilities\Str;
use App\Traits\Currencies; use App\Traits\Currencies;
use App\Traits\Media; use App\Traits\Media;
use Bkwld\Cloner\Cloneable; use Bkwld\Cloner\Cloneable;
@ -138,6 +139,11 @@ class Item extends Model
->select('items.*'); ->select('items.*');
} }
public function getInitialsAttribute($value)
{
return Str::getInitials($this->name);
}
/** /**
* Get the current balance. * Get the current balance.
* *