project = $project; $this->name = $project->name; } public function getFormSchema(): array { return [ Section::make() ->heading('Project Information') ->schema([ TextInput::make('name') ->name('name') ->label('Name') ->rules(\App\Actions\Projects\UpdateProject::rules($this->project)['name']) ->placeholder('Enter the project name'), ]) ->footerActions([ Action::make('save') ->label('Save') ->action(fn () => $this->submit()), ]), ]; } public function submit(): void { $this->authorize('update', $this->project); $this->validate(); app(\App\Actions\Projects\UpdateProject::class) ->update($this->project, [ 'name' => $this->name, ]); Notification::make() ->title('Project updated successfully!') ->success() ->send(); } }