schema([ Forms\Components\Section::make()->schema([ Forms\Components\Grid::make(2)->schema([ Forms\Components\TextInput::make('title')->label('Название группы')->required(), Forms\Components\Select::make('faculty_id')->label('Факультет')->required() ->options(Faculty::all()->pluck('title', 'id')) ]), ]), ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('id')->label('ID')->sortable(), TextColumn::make('title')->label('Название')->sortable()->searchable(), TextColumn::make('created_at')->label('Дата создания')->sortable(), Tables\Columns\BadgeColumn::make('faculty.title')->label('Категория')->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\ListEducationalGroups::route('/'), 'create' => Pages\CreateEducationalGroup::route('/create'), 'edit' => Pages\EditEducationalGroup::route('/{record}/edit'), ]; } }