Files
coreality-inc/app/Models/Permission.php
2024-03-13 10:43:39 +08:00

31 lines
832 B
PHP

<?php
namespace App\Models;
use Backpack\PermissionManager\app\Models\Permission as OriginalPermission;
use Backpack\CRUD\app\Models\Traits\SpatieTranslatable\Sluggable;
use Backpack\CRUD\app\Models\Traits\SpatieTranslatable\SluggableScopeHelpers;
use Backpack\CRUD\app\Models\Traits\SpatieTranslatable\HasTranslations;
class Permission extends OriginalPermission
{
use HasTranslations;
use Sluggable, SluggableScopeHelpers;
public $translatable = ['name'];
protected $fillable = ['slug', 'name', 'guard_name', 'updated_at', 'created_at'];
/**
* Return the sluggable configuration array for this model.
*
* @return array
*/
public function sluggable(): array
{
return [
'slug' => [
'source' => 'slug_or_name',
],
];
}
}