/** * Create or update a experience. * * @param App\Models\experience $experience * @param array $inputs * @param bool $user_id * @return App\Models\Experience */ public function save($inputs) { if (isset($inputs['intitule'])) { $this->model->intitule = $inputs['intitule']; } if (isset($inputs['description'])) { $this->model->description = $inputs['description']; } if (isset($inputs['organisation'])) { $this->model->organisation = $inputs['organisation']; } if (isset($inputs['ville'])) { $this->model->ville = $inputs['ville']; } if (isset($inputs['date_dedut'])) { $this->model->date_dedut = $inputs['date_dedut']; } if (isset($inputs['date_fin'])) { $this->model->date_fin = $inputs['date_fin']; } if (isset($inputs['cv_id'])) { $this->cv = Cv::find(intval($inputs['cv_id'])); if ($this->cv != null) { $this->model->cv_id = $this->cv->id; } } $this->model->save(); return $this->model; }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $var = Cv::find($id); if (empty($var)) { return array('cv' => array()); } $cv = array('cv' => array("id" => $var->id, "lienVideo" => $var->lienVideo, "etudiant" => $var->etudiant, "created_at" => $var->created_at, "updated_at" => $var->updated_at, "loisirs" => $var->loisirs, "competences" => $var->competences, "formations" => $var->formations, "langues" => $var->langues, "loisirs" => $var->loisirs)); return $cv; }
public function getFormations($cv_id) { $cv = Cv::find($cv_id); $formations = $cv->formations; foreach ($formations as $formation) { $formation['etablissement'] = $formation->etablissement; } return $formations; }
/** * Create or update a Loisir. * * @param App\Models\Loisir $loisir * @param array $inputs * @param bool $user_id * @return App\Models\Loisir */ public function save($inputs) { if (isset($inputs['description'])) { $this->model->description = $inputs['description']; } if (isset($inputs['cv_id'])) { $this->cv = Cv::find(intval($inputs['cv_id'])); if ($this->cv != null) { $this->model->cv_id = $this->cv->id; } } $this->model->save(); return $this->model; }
/** * Create or update a Langue. * * @param App\Models\Langue $langue * @param array $inputs * @param bool $user_id * @return App\Models\Langue */ public function save($inputs) { if (isset($inputs['intitule'])) { $this->model->intitule = $inputs['intitule']; } if (isset($inputs['niveau'])) { $this->model->niveau = $inputs['niveau']; } if (isset($inputs['cv_id'])) { $this->cv = Cv::find(intval($inputs['cv_id'])); if ($this->cv != null) { $this->model->cv_id = $this->cv->id; } } $this->model->save(); return $this->model; }
/** * Create or update a Formation. * * @param App\Models\Formation $formation * @param array $inputs * @param bool $user_id * @return App\Models\Formation */ public function save($inputs, $cv_id = null) { $this->model->intitule = $inputs['intitule']; $this->model->diplome = $inputs['diplome']; // $this->model->date_debut = $inputs['date_debut']; // $this->model->date_fin = $inputs['date_fin']; $this->model->mention = $inputs['mention']; $this->cv = Cv::find(intval($inputs['cv'])); if ($this->cv != null) { $this->model->cv_id = $this->cv->id; } $this->etablissement = Etablissement::find(intval($inputs['etablissement'])); if ($this->etablissement != null) { $this->model->etablissement_id = $this->etablissement->id; } $this->model->save(); return $this->model; }
public function getcvetudiantDetails($id) { $var = Cv::find($id); if (empty($var)) { return array(); } $e = $var->etudiant; $cv = ["id" => $var->id, "nomcv" => $var->nom_cv, "lienVideo" => $var->lienVideo, "loisirs" => $var->loisirs, "competences" => $var->competences, "experiences" => $var->experiences, "formations" => $var->formations, "langues" => $var->langues, "loisirs" => $var->loisirs]; $etudiant = ["id" => $e->id, "cne" => $e->cne, "nom" => $e->nom, "prenom" => $e->prenom, "dateNaissance" => $e->dateNaissance, "photo" => $e->photo, "telephone" => $e->telephone, "situation" => $e->situation, "adresse" => $e->adresse, "filiere" => $e->filiere, "mes_cv" => $cv]; return ["etudiant" => $etudiant]; }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $cv = Cv::find($id); return $cv->langues; }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $cv = Cv::find($id); return $cv->experiences; }
public function getcv($id) { $var = Cv::find($id); if (empty($var)) { return array(); } $cv = ["id" => $var->id, "nomcv" => $var->nom_cv, "lienVideo" => $var->lienVideo, "loisirs" => $var->loisirs, "competences" => $var->competences, "formations" => $var->formations, "langues" => $var->langues, "loisirs" => $var->loisirs]; return $cv; }
public function getEmployeeCvRegister(Request $request) { $addEmployee = new Employee(); $addEmployee->fullname = $request->input('fullname'); $addEmployee->username = $request->input('username'); $addEmployee->password = $request->input('password'); $addEmployee->email = $request->input('email'); $addEmployee->attribute = $request->input('attribute'); if ($addEmployee->save()) { $result = array("result" => "success"); } else { $result = array("result" => "failed"); } $username = \Input::get('username'); $password = \Input::get('password'); $query = DB::table('Employee')->where('username', $username)->where('password', $password)->select('employeeId')->first(); $addCv = new Cv(); $addCv->tcNo = $request->input('tcNo'); $addCv->birtday = $request->input('birtday'); $addCv->sex = $request->input('sex'); $addCv->mStatus = $request->input('mStatus'); $addCv->lastBussines = $request->input('lastBussines'); $addCv->army = $request->input('army'); $addCv->eStatus = $request->input('eStatus'); $addCv->reference = $request->input('reference'); $addCv->employeeId = $query->employeeId; if ($addCv->save()) { $result = array("result" => "success"); } else { $result = array("result" => "failed"); } return \View::make('ajaxResult', $result); }
public function index() { $cvs = Cv::get(); $etudiants = Etudiant::get(); return view('etudiant-cv.index', compact('etudiants')); }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $cv = Cv::find($id); return $cv->competences; }
/** * Update a model. * * @param array $inputs * @param $id * @return void */ public function update($inputs, $id) { $this->model = Cv::find($id); $this->model = $this->save($inputs); return $this->model; }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $cv = Cv::find($id); return $cv->loisirs; }