示例#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();
     }
 }
示例#2
0
 public function myRecipes()
 {
     return tbl_recipes::where('added_by', '=', $this->id)->get();
 }