/**
  * The details of an individual project.
  *
  * @param  int                           $project_id
  * @param  DeploymentRepositoryInterface $deploymentRepository
  * @return View
  */
 public function project($project_id)
 {
     $project = $this->projectRepository->getById($project_id);
     $optional = $project->commands->filter(function (Command $command) {
         return $command->optional;
     });
     return view('projects.details', ['title' => $project->name, 'deployments' => $this->deploymentRepository->getLatest($project_id), 'today' => $this->deploymentRepository->getTodayCount($project_id), 'last_week' => $this->deploymentRepository->getLastWeekCount($project_id), 'project' => $project, 'servers' => $project->servers, 'notifications' => $project->notifications, 'notifyEmails' => $project->notifyEmails, 'heartbeats' => $project->heartbeats, 'sharedFiles' => $project->sharedFiles, 'projectFiles' => $project->projectFiles, 'checkUrls' => $project->checkUrls, 'optional' => $optional, 'route' => 'commands']);
 }