Laravel RedirectIfAuthenticated not working

Laravel RedirectIfAuthenticated not working after moving from XAMPP to Laragon Previously I used XAMPP, then migrated to Laragon. when still using XAMPP my application is still functioning properly, but after migrating to Laragon it turns out that my application has an error, namely RedirectIfAuthenticated does not work, and even though the User name that is currently logged appears in the application header, but the session user that is currently logged does not appear when debug on Clockwork. Has anyone ever experienced the same thing here? how is the solution, I see on Google it seems that no one has discussed this issue.

this is RedirectifAuthenticated Class


namespace App\Http\Middleware;

use Closure;
use Illuminate\Support\Facades\Auth;

class RedirectIfAuthenticated
    public function handle($request, Closure $next, $guard = null)
        if (Auth::guard($guard)->check()) {
            return redirect()->route('home');
        return $next($request);

this is my login controller, i using default auth


namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;

class LoginController extends Controller

    use AuthenticatesUsers; 
    protected $redirectTo = '/home';   
    public function __construct()

my master blade

{{--layout header--}}

{{-- @includeWhen(Auth::user(),'layouts.topbar') --}}
{{--jika sudah login, maka sidebar akan muncul--}}

{{-- @includeWhen(Auth::user(),'layouts.sidebar') --}}
{{--layout konten--}}

{{-- {{(Auth::user())}} --}}
{{-- {{ --}}
  {{-- clock(Auth::user()) --}}
{{--layout footer--}}


Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us