I have two laravel routes
Route::get('/chefpage/{chefid}', 'HomeController@fetchchefdata');
which redirects to a page containing a form
<div class="form-group" method="POST" action="/addreview">
and the respective route
Route::post('/addreview', 'HomeController@addreview');
When I post the form, rather than calling the later route, it appends the data like a GET request in the url and I guess it keeps calling the first route instead.
You need an opening and closing form tag. Try something like this:
<div class="form-group">
<form action="/addreview" method="POST">
<!-- contents of your form here -->
</form>
</div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.