/** * Show the application dashboard to the user. * * @return Response */ public function index() { Blade::setContentTags('<%', '%>'); // for variables and all things Blade Blade::setEscapedContentTags('<%%', '%%>'); // for escaped data $apps = Application::where('user_id', 1)->get(); //dd($apps); return View::make('app2', ['applications' => $apps]); }
/** * Simply retrieve all applications and send them to the browser * * @return Response */ public function index() { $placeholder = [["10/24/15", "WalMart", "Sales Associate", "Indeed", "Interview Pending"], ["07/13/15", "Costco", "Sales Associate", "Indeed", "Call"]]; $apps = Application::where('user_id', Auth::user()->id)->get(); if (empty($apps)) { return json_encode($placeholder); } else { return json_encode($apps); } }