public function getApplicants()
 {
     $applicants = Applicant::all();
     foreach ($applicants as $key => $applicant) {
         $applicant->applicant_type_id = $applicant->applicantType->name;
         $applicant->application_status_id = $applicant->applicationStatus->name;
         $applicant->presentCountry = $applicant->presentCountry !== null ? Countries::getOne($applicant->presentCountry, 'en', 'cldr') : null;
     }
     return $applicants;
 }
Пример #2
0
 public function showTable()
 {
     /*
      * showtable view requires: db entries to show,
      *                        the columns to show,
      *                        the titles to display for those columns,
      *                        a list of columns that are foreign keys,
      *                        the set of ids and the values to display for each foreign key,
      *                        and a title for the table.
      */
     return View::make('showtable', ['entries' => Applicant::all(), 'cols' => ['name', 'email', 'phone', 'github_id', 'position_id', 'invitation_date', 'submission_date'], 'colTitles' => ['Name', 'Email', 'Phone', 'GitHub', 'Position', 'Invited', 'Submitted'], 'foreignKeys' => ['position_id'], 'foreignKeyToIdToValue' => ['position_id' => JobOpening::lists('title', 'id')->all()], 'name' => 'applicants', 'title' => 'Applicants']);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index($period, $value)
 {
     $applicants = Applicant::all()->load('applications', 'applications.sponsor', 'grantedloans', 'applications.loan', 'loan_returns');
     $start_date = "";
     $end_date = "";
     $new_date = date('Y');
     $start_date = date_create($new_date . "-01-01");
     $end_date = date_create($new_date . "-12-31");
     $start_date = date_format($start_date, "Y/m/d H:i:s");
     $end_date = date_format($end_date, "Y/m/d H:i:s");
     if ($period == "year") {
         $applicants = DB::table('applicants')->leftJoin('granted_loans', 'granted_loans.applicant_id', '=', 'applicants.id')->leftJoin('applications', 'applications.applicant_id', '=', 'applicants.id')->whereBetween('applicants.created_at', [$start_date, $end_date])->get();
     }
     return $applicants;
 }
Пример #4
0
 /**
  * Show the application dashboard.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $applicants = Applicant::all();
     return view('home', compact('applicants'));
 }
Пример #5
0
 public function adminShow()
 {
     $applicants = Applicant::all();
     return view('admin.admin-show', compact('applicants'));
 }
Пример #6
0
 public function showApplicants()
 {
     $applicants = Applicant::all();
     // dd($applicants);
     // $applicants = Applicant::all()->first();
     // $users = User::all()->first();
     // dd($users->address);
     // dd($applicants, $users, $academic_year);
     $no = 1;
     return view('psb.show', compact('applicants'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $applicants = Applicant::all()->load('applications', 'applications.sponsor', 'grantedloans', 'applications.loan', 'loan_returns');
     return $applicants;
 }