Files
famous-ly4-ev/app-modules/identity/src/Filament/Resources/Roles/Schemas/RoleForm.php
T

26 lines
698 B
PHP
Raw Normal View History

<?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(),
]);
}
}