Two post forms in | route problem

Posted 4 months ago by ziben69

Hello guys, in the main view I have two links pointing to two different creation views with the forms.

Link one:

<a href="{{ URL::to('business/media') }}"
                               class="btn btn-md btn-dark">Create</a>

Link two:

<a href="{{ URL::to('business/create') }}"
                               class="btn btn-md btn-primary">Create</a>

and routes to first button:

Route::get('business/media','[email protected]')->middleware('auth');
Route::post('business/', '[email protected]')->middleware('auth');

to second button:

Route::get('business/create','[email protected]')->middleware('auth');
Route::post('business/', '[email protected]')->middleware('auth');

these two buttons are included in one business view.

after clicking the button A everything is OK, after clicking the B button I get an error and the routing is directed to the path of the button A.

What can I do to make both buttons work?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.