first commit
This commit is contained in:
30
app/Models/Permission.php
Normal file
30
app/Models/Permission.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?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',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user