From cab19d691fec6cd87bf54ae60deb2d4314ffd659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Tue, 21 Jun 2022 10:00:20 +0300 Subject: [PATCH] item name initinals added --- app/Models/Common/Item.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Models/Common/Item.php b/app/Models/Common/Item.php index 2599e5e33..77091aac6 100644 --- a/app/Models/Common/Item.php +++ b/app/Models/Common/Item.php @@ -4,6 +4,7 @@ namespace App\Models\Common; use App\Abstracts\Model; use App\Models\Document\Document; +use App\Utilities\Str; use App\Traits\Currencies; use App\Traits\Media; use Bkwld\Cloner\Cloneable; @@ -138,6 +139,11 @@ class Item extends Model ->select('items.*'); } + public function getInitialsAttribute($value) + { + return Str::getInitials($this->name); + } + /** * Get the current balance. *