I'm getting this error suddenly when trying to use anything to do with Breeze, like login and view account.
Declaration of App\Http\Controllers\ProfileController::update(App\Http\Requests\ProfileUpdateRequest $request): Illuminate\Http\RedirectResponse must be compatible with App\Http\Controllers\Controller::update(Illuminate\Http\Request $request, $id)
ProfileController.php
/**
* Update the user's profile information.
*/
public function update(ProfileUpdateRequest $request): RedirectResponse
{
$request->user()->fill($request->validated());
if ($request->user()->isDirty('email')) {
$request->user()->email_verified_at = null;
}
$request->user()->save();
return Redirect::route('profile.edit')->with('status', 'profile-updated');
}
On the 'ProfileUpdateRequest $request' it's giving me this error also:
Declaration must be compatible with Controller->update(request: \Illuminate\Http\Request, id)
I've tried Googling to find anyone with a similar issue but I'm unable to. I've compared my routes file with the official Breeze docs to no avail.