URL でパラメーターを使用する名前付きルートにリダイレクトする方法を誰か説明できますか?
次のコードがあります。
Route::put('{handle}', array(
'as' => 'section.update',
'uses' => 'Manneken\\Api\\SectionManager@update'
));
Route::post('{handle}', function()
{
if (Input::has('method') && Input::get('method') === 'PUT') {
Redirect::route('section.update', array(
'handle' => ''
))->withInput();
}
});
そのため、URL に含まれるPUT を使用するルートがあり{handle}
、POST によって要求された場合は、そのルートにリダイレクトしたいと考えています。どうやって通過するの{handle}
?