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
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire