45 lines
1.6 KiB
PHP
45 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Admin\Resources\Customers\Schemas;
|
|
|
|
use Filament\Schemas\Schema;
|
|
|
|
class CustomerForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
\Filament\Forms\Components\TextInput::make('name')
|
|
->required()
|
|
->maxLength(255),
|
|
\Filament\Forms\Components\TextInput::make('email')
|
|
->email()
|
|
->required()
|
|
->unique(ignoreRecord: true)
|
|
->maxLength(255),
|
|
\Filament\Forms\Components\TextInput::make('phone')
|
|
->tel()
|
|
->maxLength(255),
|
|
\Filament\Forms\Components\Textarea::make('address')
|
|
->maxLength(65535)
|
|
->columnSpanFull(),
|
|
\Filament\Forms\Components\TextInput::make('city')
|
|
->maxLength(255),
|
|
\Filament\Forms\Components\TextInput::make('country')
|
|
->maxLength(255),
|
|
\Filament\Forms\Components\Select::make('status')
|
|
->options([
|
|
'active' => 'Active',
|
|
'inactive' => 'Inactive',
|
|
'pending' => 'Pending',
|
|
])
|
|
->default('active')
|
|
->required(),
|
|
\Filament\Forms\Components\Textarea::make('notes')
|
|
->maxLength(65535)
|
|
->columnSpanFull(),
|
|
]);
|
|
}
|
|
}
|