我有一個系統,你去http://example.com/restaurant/restaurant-key-example,你可以查看一個給定的餐廳。我有一個表格可以添加到餐廳的評論底部。Laravel 4 - 如何提交表單以向URL中的變量添加評論?
//Restaurant info page(GET)
Route::get('/restaurant/{key}', array(
'as' => 'restaurant-show',
'uses' => '[email protected]'
));
//Restaurant review submit(POST)
Route::get('/restaurant/review/{key}', array(
'as' => 'restaurant-review-post',
'uses' => '[email protected]'
))->before('csrf');
{{ Form::open(['route' => '[email protected]']) }}
當我提交它,它去http://example.com/restaurant/key?restaurant-key-example。他們有什麼好辦法可以做到這一點?我究竟做錯了什麼? 任何和所有幫助表示讚賞!
沒有足夠的代碼發佈來幫助你在這裏,缺少太多的零件。 – Wobbles 2014-09-02 21:53:01