/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(Request $request) { //Get the Number of Orders $count = Order::todaysOrders(); JavaScript::put(['foo' => 'bar', 'user' => User::first(), 'age' => 29]); return view('pages.index', ['count' => $count]); }