middleware('auth'); } /** * Show the application dashboard. * */ public function index(Request $request) { if (!$request->get('tab')) { return redirect()->route('dashboard', ['tab' => 'active_orders']); } return view('dashboard', [ 'today' => Carbon::today(), 'tab' => $request->get('tab'), 'active_orders' => Order::where('status', '!=', 'cancelled') ->where('status', '!=', 'completed') ->orderByDesc('rush') ->orderBy('due_date') ->paginate(15) ->withQueryString() ]); } }