The controller is as follows. View a search box and submit it to the search method of the controller below:
public function search(Request $request)
{
$keywords= $request->input('keywords');
$articles = Article::search($keywords)->get();
return view('pages.search-list', compact('articles'));
}
The result can be obtained normally using the get method, but the following error occurs when using the post method:
Want to know why.
I guess your form uses post, but your route is Route::get();