Nosean
4 months ago

Middleware

Posted 4 months ago by Nosean

Hello,

how can I allow different rolls to access the backend?

Have 5 different roles admin, private, farmer, dealer and guest!

It should all in the backend except guest:

My code:

        Route::middleware('auth', 'can:is-admin, is-haendler, is-privat, is-landwirt')->group(function () {
            Route::view('/', 'backend.index');
        });

Once the user is not an is-admin, he can not get in! Why ?

Please sign in or create an account to participate in this conversation.