Laravel newbieここでは、リソースコントローラなしでLaravelで更新ルートを作成します。 私が編集Laravel Update Route
Route::get('/indexedit','[email protected]')->middleware('user');
のためのルートを持っており、そこでは、以下の
<form class="col s12" method="POST" action="indexedit/{{ $val->id }}" >
{{ method_field('PUT') }}
{{ csrf_field() }}
とフォームがある二つの入力フィールドとsubmitingためのボタンがあります。更新のルートを作成しました
Route::post('indexedit/{$id}', '[email protected]');
ただし、送信時にルートが見つかりませんでした。 RouteCollection.phpラインでNotFoundHttpException 161:あなたはあなたのルートに$記号を必要としないすべての
Route :: any( '/ indexedit/{id}'、 'PagesController @ update');それを試してください.. – Sona
ちょうど試して、同じを返します。 –