schema([ Forms\Components\TextInput::make('title')->label('Название подраздела')->required() ->live(onBlur: true) ->afterStateUpdated(function (string $operation, string $state, Forms\Set $set) { $set('slug', Str::slug($state)); }), TextInput::make('slug')->label('Slug')->unique(ignoreRecord: true)->readOnly()->required(), ]); } public function table(Table $table): Table { return $table ->recordTitleAttribute('title') ->reorderable('sort') ->defaultSort('sort') ->columns([ Tables\Columns\TextColumn::make('title')->label('Заголовок подраздела'), ]) ->filters([ // ]) ->headerActions([ Tables\Actions\CreateAction::make(), Tables\Actions\AssociateAction::make() ]) ->actions([ Tables\Actions\EditAction::make(), Tables\Actions\DetachAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DetachBulkAction::make(), ]), ]); } }