W
W
WebDev2016-01-19 13:04:21
Laravel
WebDev, 2016-01-19 13:04:21

Missing parameter when submitting laravel form?

There is a route

Route::match(['get', 'post'], '/organizer/purchase/{purchase_id}/create-catalog', ['as' => 'create_catalog', 'uses' => '[email protected]']);

During the transition, the get method opens a view with a form, then this form is sent here by post. When it is sent, instead of a number (purchase_id), it redirects to /organizer/purchase/%7Bpurchase_id%7D/create-catalog.
I tried not to specify anything at all in the action and explicitly specify the route and pass the required purchase_id there.
What am I doing wrong?
PS If I take out the parameter in the route to the end of the line, then everything works.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mustafo, 2016-01-19
@mustafo

Try using the route function:

{!! Form::open(['route' => route('create_catalog', ['purchase_id' => $purchase->id])]) !!}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question