Exemplo n.º 1
0
 public function myRecipes($flag)
 {
     if ($flag == 1) {
         return tbl_recipes::where('added_by', '=', Auth::user()->id)->count();
     } else {
         return tbl_recipes::where('added_by', '=', Auth::user()->id)->get();
     }
 }
Exemplo n.º 2
0
 public function myRecipes()
 {
     return tbl_recipes::where('added_by', '=', $this->id)->get();
 }