currentProject = auth()->user()->currentProject; $this->projects = auth()->user()->allProjects()->get(); } public function updateProject(Project $project): void { $this->authorize('view', $project); auth()->user()->update(['current_project_id' => $project->id]); $this->redirect('/'); } }