我有一个系统,你去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