samedi 10 février 2018

Laravel: Forms on pages with url parameters

I have a routes generated as below and want to put a form on the page:

Route::get('suppliers/dashboards/{supplier}', ['uses'=>'SuppliersDashInvoiceController@index'])->middleware('auth');

Route::post('suppliers/dashboards/{supplier}', array( 'before' => 'csrf', 'uses' => 'SuppliersDashInvoiceController@iprocess'))->middleware('auth');

But when using the Form laravel helper, I get an error relating to

Missing required parameters for [Route: ] [URI: suppliers/dashboards/{supplier}]

Form helper:

{!! Form::open(array('action' => array('SuppliersDashInvoiceController@iprocess'))) !!}

Does anyone know how to pass the {supplier} parameter to the form open helper, its not documented in the laravel docs.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire