public function getReporteshoy() { $today = Carbon::toDay()->toDateString(); $ventas = Venta::where('fecha', '=', $today)->count(); $platillos = Orden::where(DB::raw('DATE(created_at)'), $today)->get()->sum('platillo_count'); $ordenes = Orden::where(DB::raw('DATE(created_at)'), $today)->get()->count(); $total = Orden::where(DB::raw('DATE(created_at)'), $today)->with('platillos')->get()->sum('platillo_total'); return view('reportes.hoy', compact('ventas', 'platillos', 'ordenes', 'total')); }
public function postPlatillos(Request $request) { $platillos = Orden::where('id', '=', $request['id'])->with('platillos')->get(); return $platillos; }
public function postPlatillos(Request $request) { return Orden::where('id', '=', $request->get('id'))->with('platillos')->get(); }