feat(User,Role): add users and role , permssion , filament panel | [USER , ROLE]
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Permissions\Schemas;
|
||||
|
||||
use Filament\Forms\Components\CheckboxList;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class PermissionForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->label('نام')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('slug')
|
||||
->label('شناسه')
|
||||
->required()
|
||||
->unique(ignoreRecord: true)
|
||||
->maxLength(255),
|
||||
CheckboxList::make('roles')
|
||||
->label('نقشها')
|
||||
->relationship(titleAttribute: 'name')
|
||||
->searchable()
|
||||
->bulkToggleable()
|
||||
->columns(2),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user