/** * 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; }
public static function myProjects() { $p = new Project(); return $p->whereOwner(\Auth::user()->id)->get(); }