Example #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $projects = Project::whereOwner(\Auth::user()->id)->get(['id', 'title', 'description']);
     return $projects;
 }
Example #2
0
 public static function myProjects()
 {
     $p = new Project();
     return $p->whereOwner(\Auth::user()->id)->get();
 }