/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $interviews = Candidate::where('status_record_id', 3)->get();
     $employees = Employee::all();
     $employall = array();
     $employall += array('0' => 'None');
     foreach ($employees as $key => $value) {
         $employall += array($value->id => $value->lastname . " " . $value->firstname);
     }
     $statusrecord = StatusRecord::lists('name', 'id');
     return view('employee.interview', compact('statusrecord', 'interviews', 'employall'));
 }
 /**
  * Display candidate's information
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $candidate = Candidate::find($id);
     $candidate->date_of_birth = $this->convert_datetimesql_to_datepicker($candidate->date_of_birth);
     $candidate->date_submit = $this->convert_datetimesql_to_datepicker($candidate->date_submit);
     $f1 = FileCandidate::lists('id');
     $f2 = $candidate->filecandidates()->get();
     $status_records = StatusRecord::whereIn('id', array(1, 3, 4))->get();
     $res_status = array();
     foreach ($status_records as $k_sta => $v_sta) {
         $res_status += array($v_sta->id => $v_sta->name);
     }
     $status_records = $res_status;
     $positions = Position::lists('name', 'id');
     return view('candidates.editcandidate', compact('positions', 'status_records', 'candidate', 'f1', 'f2'));
 }
 /**
  * update status
  * @return response
  */
 public function saveedit()
 {
     $data = Request::input('status');
     StatusRecord::find($data['id'])->update($data);
 }