public function location($loc) { if ($loc == "home") { $graphs = new Graphs(); $sql = $graphs->last_activities(); $sql2 = $graphs->last_pendingactivities(); $sql3 = DB::select(DB::raw("SELECT * FROM `home_page`")); return View::make('home.home_', compact('sql', 'sql2', 'sql3', 'loc')); } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { session_start(); //create a session for location $_SESSION['loc'] = "home"; $graphs = new Graphs(); $sql = $graphs->last_activities(); $sql2 = $graphs->last_pendingactivities(); $sql3 = DB::select(DB::raw("SELECT * FROM `home_page`")); return View::make('home.home_', compact('sql', 'sql2', 'sql3', 'loc')); }