auth()->user returns null in laravel 8 and backpackforlaravel

I am using Bapckpack for Laravel, for frontend I want to create custom registration. After successful registration auth()->user() returns null? Any ideas to fix it?

Upvotes: 0

Views: 343

Answers (1)

TheVVVil
TheVVVil

Reputation: 31

if you have created your own registration page, just inserting the record into the database won't make the user logged in. for that purpose you can use Auth::login() or auth()->loginUsingId()

Upvotes: 1

Related Questions