/** * Display a listing of the resource. * * @return Response */ public function index() { // $cats = Cat::where('is_public', '=', true)->orwhere('created_user_id', '=', Auth::id())->get(); return view('cats.index')->with('cats', $cats); }
public static function getPet($user_id) { $cats = Cat::where('created_user_id', '=', $user_id)->get(); return $cats; }