schema([ TextInput::make('name') ->required(), TextInput::make('email') ->email() ->required(), TextInput::make('password') ->password() ->required() ->hiddenOn('edit'), Select::make('roles') ->multiple() ->relationship('roles', 'name') ->preload() ->helperText('Biarkan kosong untuk role default (mahasiswa)'), ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('name') ->searchable() ->sortable(), TextColumn::make('email') ->searchable() ->sortable(), TextColumn::make('roles.name') ->badge() ->color('primary'), TextColumn::make('password'), TextColumn::make('created_at') ->dateTime() ->sortable(), TextColumn::make('updated_at') ->dateTime() ->sortable(), ]) ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ 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'), ]; } }