In Laravel 5.8, I have a form with multiple search parameters. If a user clicks reset I want to reset all request values. In my Controller index():
if ($request->input('reset')) {
$request->flush();
}
However when I check $request after flush the values are still present. So if I return the view() the request is still present. However if I redirect the user back to the index the request has cleared successfully. Is there a way to empty the request without calling a redirect?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire