Initial commit
This commit is contained in:
26
app/Filament/Resources/Roles/Schemas/RoleForm.php
Normal file
26
app/Filament/Resources/Roles/Schemas/RoleForm.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Roles\Schemas;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class RoleForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->label('Nazwa')
|
||||
->required()
|
||||
->unique(ignoreRecord: true),
|
||||
Select::make('permissions')
|
||||
->label('Uprawnienia')
|
||||
->multiple()
|
||||
->relationship('permissions', 'name')
|
||||
->preload()
|
||||
->searchable(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user