/**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     //
     // dd($request);
     $typeDeContrat = TypeContrat::create($request->all());
     return redirect(route('typeDeContrat.index'));
 }
예제 #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $personnel = Personnels::findOrFail($id);
     $typedecontrat = TypeContrat::lists('type_de_contrat', 'id')->toArray();
     return view('personnel.edit', compact('personnel', 'typedecontrat'));
 }
예제 #3
0
 public function scopegetContrat()
 {
     return TypeContrat::where('id', $this->type_de_contrat_id);
 }