コード例 #1
0
 public function view_dashboard()
 {
     /*
     		if (Auth::check())
     		{
     			$user=Session::get('sess_user_arr');
     			$parent=ParentModel::where('userid','=',$user['userid'])->first();
     			return View::make('content.dashboard')->with('user',$user)->with('parent',$parent);
     		}*/
     $user = Session::get('sess_user_arr');
     if ($user != "") {
         $children = DB::table('user')->leftJoin('child', 'user.userid', '=', 'child.userid')->where('child.parentusername', '=', $user['username'])->get();
         $blocklist = DB::table('blacklist')->where('parentusername', '=', $user['username'])->get();
         $parent = ParentModel::where('userid', '=', $user['userid'])->first();
         return View::make('content.dashboard')->with('user', $user)->with('parent', $parent)->with('children', $children)->with('blocklist', $blocklist);
     } else {
         return View::make('content.entry')->with('message', 'Oops, you are not logged in yet!')->with('background', '#F6CECE')->with('sets', $this->sets);
     }
 }