schema([ Card::make() ->schema([ TextInput::make('name')->required()->maxLength(255), TextInput::make('email')->required()->maxLength(255)->email()->label('Email Address'), TextInput::make('password') ->password() ->required(fn(Page $livewire): bool => $livewire instanceof CreateRecord) ->minLength(8) ->maxLength(16) ->dehydrated(fn($state) => filled($state)) ->same('passwordConfirmation') ->dehydrateStateUsing(fn($state) => Hash::make($state)), TextInput::make('passwordConfirmation') ->label('Password Confirmation') ->password() ->required(fn(Page $livewire): bool => $livewire instanceof CreateRecord) ->minLength(8) ->maxLength(16) ->dehydrated(false) ]) ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('name')->searchable(), TextColumn::make('email')->searchable(), TextColumn::make('created_at'), TextColumn::make('updated_at') ]) ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\DeleteBulkAction::make(), ]); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListUsers::route('/'), 'create' => Pages\CreateUser::route('/create'), 'edit' => Pages\EditUser::route('/{record}/edit'), ]; } }