Всем доброго вечера. Вышла эта ошибка - понимаю почему.The PUT method is not supported for this route. Supported methods: GET, HEAD.
//Это view
<form action='{{ url("edit/".$agent->ORG_ID) }}' method="POST">
<input type="hidden" name="_method" value="PUT">
{{ csrf_field() }}
//Контроллер
public function agentUpdate(Request $request,$id)
{
$agent = Agent::findOrFail($id);
$agent ->$request['ORG_ID'];
$agent ->$request['ORG_NAME'];
$agent ->$request['EMAIL'];
$agent -> Hash::make($request['PASSWORD']);
$agent ->$request['ORG_ABBREV'];
$agent ->$request['REF_TOWN'];
$agent ->$request['PHONE1'];
$agent ->$request['PHONE2'];
$agent ->$request['FAX'];
$agent ->$request['MANAGER'];
$agent ->$request['HTL_SC'];
$agent ->$request['DOGOVOR_DATE'];
$agent ->$request['DOGOVOR_N'];
$agent ->$request['ADDRESS'];
$agent ->$request['INN'];
$agent ->$request['RS'];
$agent ->$request['REF_DEPT'];
$agent ->$request['IATA_NUMBER'];
$agent ->$request['ACTIVE_DT'];
$agent ->$request['MFO'];
$agent->update();
return redirect('/');
}
//РОУТЕР
Route::get('/edit/{id}', [App\Http\Controllers\MainController::class, 'agentUpdate']);