public function more_verify($san) { if (StudentSource::where('san', '=', $san)->orderBy('id', 'desc')->first()->source == 2) { $agents_laps = ApplicationLap::lists('name', 'id'); } elseif (StudentSource::where('san', '=', $san)->orderBy('id', 'desc')->first()->source == 1) { $agents_laps = ApplicationAgent::lists('name', 'id'); } else { $agents_laps = ApplicationLap::lists('name', 'id'); } return View::make('students.more_verify')->with('information_sources', ApplicationSource::lists('name', 'id'))->with('admission_managers', ApplicationAdmissionManager::lists('name', 'id'))->with('application_agents', ApplicationAgent::lists('name', 'id'))->with('application_laps', ApplicationLap::lists('name', 'id'))->with('nationalities', StaticNationality::lists('name', 'id'))->with('countries', StaticCountry::lists('name', 'id'))->with('course_names', ApplicationCourse::lists('name', 'id'))->with('awarding_bodies', ApplicationAwardingBody::lists('name', 'id'))->with('education_qualifications', ApplicationEducationalQualification::lists('name', 'id'))->with('method_of_payment', ApplicationPaymentInfoMethodsOfPayment::lists('name', 'id'))->with('application_status', ApplicationStatus::lists('name', 'id'))->with('intake_year', StaticYear::lists('name', 'id'))->with('intake_month', StaticMonth::lists('name', 'id'))->with('intake', ApplicationIntake::lists('name', 'id'))->with('supervisors', User::lists('first_name', 'id'))->with('student', Student::where('san', '=', $san)->orderBy('id', 'desc')->first())->with('studentSource', StudentSource::where('san', '=', $san)->orderBy('id', 'desc')->first())->with('ttStudentContactInformation', DB::table('student_contact_informations')->where('student_contact_information_type', '=', 1)->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('studentContactInformation', DB::table('student_contact_informations')->where('student_contact_information_type', '=', 2)->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('studentContactInformationOnline', DB::table('student_contact_information_onlines')->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('student_contact_information_kin_detailes', DB::table('student_contact_information_kin_detailes')->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('student_course_enrolments', DB::table('student_course_enrolments')->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('student_educational_qualifications', DB::table('student_educational_qualifications')->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('student_english_lang_levels', DB::table('student_english_lang_levels')->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('studentWorkExperience', DB::table('student_work_experiences')->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('student_payment_info_metadata', DB::table('student_payment_info_metadatas')->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('studentPaymentInfo', DB::table('student_payment_infos')->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('student_bqu_data', DB::table('student_bqu_data')->where('san', '=', $san)->orderBy('id', 'desc')->first())->with('information_sources', ApplicationSource::lists('name', 'id'))->with('admission_managers', ApplicationAdmissionManager::lists('name', 'id'))->with('agents_laps', $agents_laps); }