Support the ongoing development of Laravel.io →
Laravel Authentication
Last updated 2 years ago.
0

Hi @Borisko,

You might have solved it by now? But it seems like you're defining a route-group, but not actually defining routes themselves.

Try this instead:

Route::middleware(['auth'])->group(function () {
    Route::get('/', function () {
        dump(Auth::user());
    });
});

First you define the route group and then in the closure, define the actual route.

Hope that helps!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Borisko laravelist Joined 31 Jul 2018

Moderators

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

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.