Getting this when redirected from the controller or middleware, just cloned this project from the live server to the local machine.
have also tried this php artisan serve but still facing the same issue
========Route=========
Route::post('/authenticate', [UserController::class, 'authenticate'])->name('authenticate');
========Controller=========
return redirect('dashboard')->with('success', 'Login successfull.');
The server PHP version was 8.1, mine is 8.2
