components([ TextInput::make('title') ->required() ->live(onBlur: true) ->afterStateUpdated(fn ($state, callable $set) => $set('slug', \Illuminate\Support\Str::slug($state))), TextInput::make('slug') ->required() ->unique(ignoreRecord: true), TextInput::make('summary') ->columnSpanFull(), RichEditor::make('description') ->columnSpanFull(), FileUpload::make('image') ->image() ->disk('public') ->directory('projects'), TextInput::make('url') ->label('Live URL') ->url(), TextInput::make('repository_url') ->label('Repository URL') ->url(), TagsInput::make('tech_stack') ->label('Tech stack') ->columnSpanFull(), Toggle::make('is_featured') ->default(false), TextInput::make('sort_order') ->required() ->numeric() ->default(0), ]); } }