I'm building a Laravel
-app where I have two forms in one blade
-template, which appears depending on which tab is active.
It looks like this:
<div data-contact-form-id="1" class="contact-form" id="contact-company">
<form method="POST" action="{{ route('contact.company') }}">
// bunch of input fields here
</form>
</div>
<div data-contact-form-id="2" class="contact-form" id="contact-private">
<form method="POST" action="{{ route('contact.store') }}">
// bunch of input fields here
</form>
</div>
then my web.php
Route::post('contact', 'ContactController@store')->name('contact.store');
Route::post('contact/company', 'ContactController@company')->name('contact.company');
but I can't submit the "company-contact" form, and when I try to do remove the slash in the route I get an error route.store
is not defined:
Route::post('contact', 'ContactController@store')->name('contact.store');
Route::post('contact', 'ContactController@company')->name('contact.company');
Why is this and how can I solve this?