public function getDetalle($pedido_id) { // dd($pedido_id); $pedido = Pedido::where('id', $pedido_id)->first(); // dd($pedido->provider_id); $proveedor = Proveedor::where('id', $pedido->provider_id)->first(); // dd($proveedor); $categories = Articulo::where('provider_id', $pedido->provider_id)->get(); // dd($categories); $lineas = Linea::where('pedido_id', $pedido->id)->get(); // dd($lineas); return view('pedidos.detalle')->with('pedido', $pedido)->with('proveedor', $proveedor)->with('categories', $categories)->with('lineas', $lineas); }
public function getPlantilla($plantilla_id) { $lineas = LineaPlantilla::where('plantilla_id', $plantilla_id)->orderBy('id', 'DESC')->get(); $plantilla = Plantilla::where('id', $plantilla_id)->first(); $restaurante = $plantilla->restaurante; $seccion = $plantilla->seccion; $descripcion = $plantilla->descripcion; $categories = Articulo::all(); return view('plantillas.detalle')->with('plantilla_id', $plantilla_id)->with('restaurante', $restaurante)->with('lineas', $lineas)->with('seccion', $seccion)->with('descripcion', $descripcion)->with('categories', $categories); }