public function loadCareerProfileTypeUser()
 {
     $career = Career::all();
     $profile = Profile::all();
     $typeProfile = Type_user::all();
     return view('create', array('carrer' => $career, 'profile' => $profile, 'typeProfile' => $typeProfile));
 }
Ejemplo n.º 2
0
 public function delete($id)
 {
     $objCareer = \App\Career::findOrFail($id);
     if (!$this->objLoggedInUser->HasPermission("Edit/Careers")) {
         abort('404');
     }
     $objCareer->status = \App\Career::STATUS_DELETED;
     if ($objCareer->save()) {
         exit('success');
     }
     exit('error');
 }
Ejemplo n.º 3
0
 function view_career($id)
 {
     $objCareer = \App\Career::findOrFail($id);
     View::share('objCareer', $objCareer);
     return view('view_career');
 }
Ejemplo n.º 4
0
 public function careerJson()
 {
     $return_array = array();
     $career = Career::all();
     foreach ($career as $career) {
         $data_array['id'] = $career->id;
         $data_array['title'] = $career->title;
         $data_array['years'] = $career->years;
         $data_array['jobdesk'] = $career->jobdesk;
         $data_array['description'] = $career->description;
         array_push($return_array, $data_array);
     }
     echo json_encode($return_array);
 }
 /**
  * Display careers by area
  * Responds to requests to GET /careers/by-area/{area}
  *
  * @param  string  $area
  * @return JSON
  */
 public function getByArea($area)
 {
     $result = Career::with('universities')->select('id', 'name', 'area')->where('area', $area)->get();
     return response()->json($result->toArray());
 }