예제 #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $cv = $this->cv_gestion->store($request->all());
     $loisir = new Loisir();
     $loisir->cv_id = $cv->id;
     $loisir->save();
     return ['cv_id' => $cv->id, 'etudiant_id' => $cv->etudiant_id];
 }
예제 #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request = null)
 {
     $cv = $this->cv_gestion->store($request->all());
     $loisir = new Loisir();
     $loisir->cv_id = $cv->id;
     $loisir->save();
     return redirect()->route('createcv', [$cv->id]);
 }
예제 #3
0
 /**
  * Update a model.
  *
  * @param  array  $inputs
  * @param  $id
  * @return void
  */
 public function update($inputs, $id)
 {
     $this->model = Loisir::find($id);
     return $this->save($inputs);
 }