first commit

This commit is contained in:
ericli1018
2024-03-13 10:43:39 +08:00
commit 1caae33c43
677 changed files with 105611 additions and 0 deletions

30
app/Models/Role.php Normal file
View File

@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Backpack\PermissionManager\app\Models\Role as OriginalRole;
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 Role extends OriginalRole
{
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',
],
];
}
}