/**
  *
  * @param $typing
  * @return mixed
  */
 private function recipes($typing)
 {
     $recipes = Recipe::where('user_id', Auth::user()->id)->where('name', 'LIKE', $typing)->get();
     return $recipes;
 }
Пример #2
0
 function _recipe_name_exists($recipe_name)
 {
     $recipe = new Recipe();
     $recipe->where('name', $recipe_name)->get();
     if ($recipe->exists()) {
         return false;
     }
     return true;
 }