#breeze guard customer

8 messages · Page 1 of 1 (latest)

stuck forgeBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

light terrace
#

You need to update the homepage views. They are only checking against a logged in user not an authorized user.

flint oxide
#

I have applied this but now guest users are redirected to the login page

    Route::get('/', function () {
        return view('homepage');
    })->name('home');
});```
light terrace
#

It’s in the blade file. Not the middleware.

#

The blade file is using @auth you need to adjust it there.

flint oxide
#

i have updated the code with

{{ Auth::guard('customer')->user()->name }}

flint oxide
#

i am facing the issue with the logout. when i logout from the frontend the admin automatically also logs out. Anyone has a clue?

#

This route with middelware and guard is stored in routes\auth.php

Route::middleware('auth:customer')->post('logout', [AuthenticatedSessionController::class, 'destroy'])->name('logout');

When clicking on it the admin users also log out.