/**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     // dd($request->input('Status_id'));
     //$passUpdate=PassportStatus::create($request->all());
     //  $passUpdate=Passport::create($request->all());
     $passports = Passport::findorFail($id);
     $passports->status()->attach($request->input('Status_id'));
     // $passports->update($passUpdate);
     return redirect('admin/passportstatus');
 }
Exemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $passports = Passport::findorFail($id);
     $passports->delete();
     return redirect('admin/passport');
 }