1
我需要將多個參數傳遞給Laravel 5中的重定向。我嘗試了以下方法,但它給了我錯誤「HTTP狀態碼」1「無效。Laravel 5重定向::與多個參數
return Redirect::to('availability', array('date' => urlencode(Session::get('bookingFormData.date')), 'expired' => 'true'));
我的路線設置如下:
Route::get('availability', '[email protected]');
所以它不可能爲我重新導向到像/上市日期= XYZ和過期=真 – V4n1ll4
當然,你可以使用http://php.net/manual/en/function.http? -build-str.php來追加它,或者看看Antonio的答案:http://stackoverflow.com/questions/25765874/how-to-redirect-a-named-route-with-querystring-in-laravel -4-2 –
所以我試着'返回Redirect :: route('availability',['test'=> 1]);'但仍然沒有運氣。現在它給了'Route [availability] not defined.' – V4n1ll4