我有如下生成的路由,并想在页面上放置一个表单:
Route::get('suppliers/dashboards/{supplier}', ['uses'=>'SuppliersDashInvoiceController@index'])->middleware('auth');
Route::post('suppliers/dashboards/{supplier}', array( 'before' => 'csrf', 'uses' => 'SuppliersDashInvoiceController@iprocess'))->middleware('auth');
但是在使用Form laravel helper时,我得到了一个与以下内容相关的错误
Missing required parameters for [Route: ] [URI: suppliers/dashboards/{supplier}]
表单帮助器:
{!! Form::open(array('action' => array('SuppliersDashInvoiceController@iprocess'))) !!}
有谁知道如何将{supplier}
参数传递给表单打开帮助器,这在laravel文档中没有说明。
发布于 2018-02-10 13:58:08
需要传入参数,例如:
{!! Form::open(['action' => ['SuppliersDashInvoiceController@iprocess', $supplier->id]]) !!}
https://stackoverflow.com/questions/48721547
复制相似问题