Exemplo n.º 1
0
 /**
  * Sets the projects for viewing
  *
  * @return array
  */
 private function setProjects()
 {
     $ids = [];
     $projects = ProjectAccess::where('user_id', $this->user->id)->get();
     foreach ($projects as $project) {
         if ($project->user_id === $this->user->id) {
             $ids[] = $project->project_id;
         }
     }
     return $ids;
 }
Exemplo n.º 2
0
 /**
  * Handles POST requests for /project/{project_id}/accessremove
  *
  * @return redirect
  */
 public function postProjectAccessRemove($project_id)
 {
     $access = ProjectAccess::where('project_id', $project_id)->where('user_id', $this->input['id'])->delete();
     return Redirect::back()->with(['error' => false, 'message' => 'Users access removed sucessfully.']);
 }