コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
ファイル: CvController.php プロジェクト: DIALLOIMRAN/my-cv
 /**
  * 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;
 }
コード例 #3
0
 public function getFormations($cv_id)
 {
     $cv = Cv::find($cv_id);
     $formations = $cv->formations;
     foreach ($formations as $formation) {
         $formation['etablissement'] = $formation->etablissement;
     }
     return $formations;
 }
コード例 #4
0
ファイル: LoisirRepository.php プロジェクト: zi9o/projet-cv
 /**
  * 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;
 }
コード例 #5
0
ファイル: LangueRepository.php プロジェクト: zi9o/projet-cv
 /**
  * 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;
 }
コード例 #6
0
 /**
  * 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;
 }
コード例 #7
0
ファイル: BaseRepository.php プロジェクト: zi9o/projet-cv
 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];
 }
コード例 #8
0
ファイル: LangueController.php プロジェクト: zi9o/projet-cv
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $cv = Cv::find($id);
     return $cv->langues;
 }
コード例 #9
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $cv = Cv::find($id);
     return $cv->experiences;
 }
コード例 #10
0
ファイル: BaseRepository.php プロジェクト: zi9o/cv-generator
 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;
 }
コード例 #11
0
 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);
 }
コード例 #12
0
 public function index()
 {
     $cvs = Cv::get();
     $etudiants = Etudiant::get();
     return view('etudiant-cv.index', compact('etudiants'));
 }
コード例 #13
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $cv = Cv::find($id);
     return $cv->competences;
 }
コード例 #14
0
ファイル: CvRepository.php プロジェクト: zi9o/projet-cv
 /**
  * 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;
 }
コード例 #15
0
ファイル: LoisirController.php プロジェクト: zi9o/projet-cv
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $cv = Cv::find($id);
     return $cv->loisirs;
 }