'required|string|min:3', ]; protected $validationAttributes = [ 'name' => 'Environment Name', ]; public function submit() { try { $this->validate(); $environment = Environment::create([ 'name' => $this->name, 'project_id' => $this->project->id, ]); return $this->redirectRoute('project.resources', [ 'project_uuid' => $this->project->uuid, 'environment_name' => $environment->name, ], navigate: true); } catch (\Throwable $e) { handleError($e, $this); } finally { $this->name = ''; } } }