-2
My Blade
<form action="{{route('Update.afiliados', $users->id)}}" method="POST">
@csrf
@method('put')
<button class="btn btn-block btn-flat btn-primary" method="post">
<span class="fas fa-user-minus"></span>
ATUALIZAR
</button>
</form>
</form>
My Controller
public function update(Request $request)
{ if (!$users = users::find($id))
{
return redirect('Afiliados');
}
//$users = users::where('id', $id)->first();
$users = users::findOrFail($request->id)->update($request->all());
dd('TA OK');
}
my route
Route::put('/Afiliados/{id}', [App\Http\Controllers\AfiliadosController::class, 'update'])->name('Update.afiliados');
When does this error occur? When submitting the form? What version of the Standard? These are details that help answer the question.
– Marcos Xavier