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