added form login, user for frontend and backend
This commit is contained in:
1 parent
a5ef904c1e
commit
5488a80b91
14 files changed
+350
-15
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Users\Schemas;
|
||||
|
||||
use Filament\Forms\Components\Checkbox;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class UserForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->label('Name')
|
||||
->required(),
|
||||
TextInput::make('email')
|
||||
->label('E-Mail')
|
||||
->email()
|
||||
->required()
|
||||
->unique(ignoreRecord: true),
|
||||
TextInput::make('password')
|
||||
->label('Passwort')
|
||||
->password()
|
||||
->revealable()
|
||||
->required(fn (string $operation) => $operation === 'create')
|
||||
->dehydrateStateUsing(fn ($state) => filled($state) ? bcrypt($state) : null)
|
||||
->dehydrated(fn ($state) => filled($state))
|
||||
->minLength(8),
|
||||
Checkbox::make('is_admin')
|
||||
->label('Administrator'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user