working with Laravel 5.6 and Mysql. and need delete table data using following data.
<td><a class="button is-outlined" href="/student//delete">Delete</a></td>
and Controller delete function is,
public function delete($id)
{
DB::table('students')
->where('id', $id)
->delete();
return redirect()->back();
}
and route is like this,
Route::resource('student','StudentController');
but when click delete button it is generated following error message, (1/1) NotFoundHttpException
how can fix this problem?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire