26 lines
698 B
PHP
26 lines
698 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Modules\Identity\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')
|
||
|
|
->disabled()
|
||
|
|
->dehydrated(false),
|
||
|
|
CheckboxList::make('permissions')
|
||
|
|
->relationship(name: 'permissions', titleAttribute: 'name')
|
||
|
|
->columns(2)
|
||
|
|
->bulkToggleable()
|
||
|
|
->columnSpanFull(),
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|