1

我可以在 firebug 控制台中看到 POST 开始并完成,我看到 GET 开始,但挂起并且永远不会结束。任何人都经历过这种情况和/或知道可能是什么原因造成的?

路线:

Route::post('recipes/submitList', array('uses'=>'recipes@submitList'));
Route::get('results/list', array('as'=>'list', 'uses'=>'recipes@list'));

控制器:

class Recipes extends Base_Controller{
    public function post_submitList(){
            // builds array from DB
            // etc
    return Redirect::to_route('list')
        ->with('list', $ingrs);
}
public function get_list(){
    return View::make('list')
        ->with('title', 'Your Shopping List!');
    }
}

此外,如果我通过 console.log(response) 回显响应,我会从我想要重定向到的页面中获取所有 HTML。但是,在控制台中循环的 GET 没有响应,但确实有“200 OK [cycle-gif] 313ms”。

4

1 回答 1

0

In your Get http verb, your are using 'results/list', and maybe it should be 'recipes/list'.

Route::get('recipes/list', array('as'=>'list', 'uses'=>'recipes@list'));
于 2013-01-07T21:27:53.010 回答