Widget and Report check is module disabled
This commit is contained in:
@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user