feat(User,Role): add users and role , permssion , filament panel | [USER , ROLE]
This commit is contained in:
32
app/Filament/Resources/Roles/Schemas/RoleForm.php
Normal file
32
app/Filament/Resources/Roles/Schemas/RoleForm.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Roles\Schemas;
|
||||
|
||||
use Filament\Forms\Components\CheckboxList;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class RoleForm
|
||||
{
|
||||
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('permissions')
|
||||
->label('دسترسیها')
|
||||
->relationship(titleAttribute: 'name')
|
||||
->searchable()
|
||||
->bulkToggleable()
|
||||
->columns(2),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user