public function insert() { if (Session::has('id') && (Session::get('type') === 'Admin' || Session::get('type') === 'SuperAdmin')) { $sub = Subject_List::lists('subject_name'); return View::make('insert')->with('sub', $sub); } else { echo 'You are not authorized'; } }