public function getViewImages() { if (UsersHelper::checkLogged()) { $data['albums'] = Album::where('user_id', Session::get('current_user'))->get(); return View::make('frontend/users/view-images')->with('data', $data); } else { return Redirect::to('home/index'); } }