Level 122
You need to change it into a GET request rather than a post, and make sure you append the search term to the subsequent pages
I have a form that I am using to search. I post to a new page that shows the search results, however when i click on the 2nd pagination link i get an error.
Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException
No message
Here is the form.
<form method="POST" action="/searchresults" class="form-horizontal">
{{ csrf_field() }}
Fields
</form>
Here is the routes
Route::get('/search', 'UserController@searchView')->name('search.view');
Route::post('/searchresults', 'UserController@search');
How can I make a paginated search work?
You need to change it into a GET request rather than a post, and make sure you append the search term to the subsequent pages
Please or to participate in this conversation.