mardi 9 février 2021

Having problem in delete query with laravel

Hey i am facing a problem in delete query . my Controller code is

 public function destroy($id)


 { 


   $employee= Employee::findorfail($id);

   $employee->delete();

    return redirect('/employee');
 
 }

and view code is

<form action="/employees/">
  <input type="hidden" value="DELETE" name="_method">
  <input type="submit" value="DELETE">

</form>

but still it is not deleting the record



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3oZxtKB
via IFTTT

Aucun commentaire:

Enregistrer un commentaire