Widget and Report check is module disabled

This commit is contained in:
Cüneyt Şentürk
2022-06-18 00:16:09 +03:00
parent 2e79a9b5fa
commit 0f5f592c71
4 changed files with 55 additions and 5 deletions

View File

@ -53,6 +53,22 @@ class Widget extends Model
return $this->hasManyThrough('App\Models\Auth\User', 'App\Models\Common\Dashboard');
}
/**
* Get the alias based on class.
*
* @return string
*/
public function getAliasAttribute()
{
if (Str::startsWith($this->class, 'App\\')) {
return 'core';
}
$arr = explode('\\', $this->class);
return Str::kebab($arr[1]);
}
/**
* Create a new factory instance for the model.
*