public function all() { return Recipe::all(); }
public function getNullRecipeSearch($paramArray) { return Product::whereNotIn('id', Recipe::all()->lists('product_id'))->where($paramArray)->get(); }
public function getNullRecipe() { return ItemGroup::whereNotIn('id', Recipe::all()->lists('product_id'))->get(); }
public function compute($orderid = false) { if (!$orderid) { $recipe = Recipe::all()->lists('product_id'); $products = Product::whereIn('id', $recipe)->lists('name', 'id'); //$products = Product::with('recipe' ,'recipe_id')->lists('name', 'id'); } $order = \bepc\Models\Order::find($orderid); $ids = $order->orderdetail->lists('product_id'); $products = Product::whereIn('id', $ids)->lists('name', 'id'); return view('self.blade.product.compute')->with(compact('products', 'ids')); }