schema([ Forms\Components\Section::make()->schema([ Forms\Components\TextInput::make('title') ->live(onBlur: true) ->afterStateUpdated(function (string $operation, string|null $state, Forms\Set $set) { $set('slug', Str::slug($state)); }) ->label('Заголовок слайдера') ->required(), TextInput::make('slug')->label('Slug')->unique(ignoreRecord: true)->readOnly()->required(), Toggle::make('is_active')->default(true)->label('Активный слайдер')->inline(false), ]), ]); } public static function table(Table $table): Table { return $table ->columns([ // ]) ->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\ListSliders::route('/'), 'create' => Pages\CreateSlider::route('/create'), 'edit' => Pages\EditSlider::route('/{record}/edit'), ]; } }