Support the ongoing development of Laravel.io →
Authentication
Last updated 1 year ago.
0

If I didn't understand wrong, you want the user redirect to a page which is only for regşstered users after registering. In this case, you can use insertGetId while registering and get the id. For example:

$id = DB::table('users')->insertGetId(
    ['email' => '[email protected]', 'name' => 'John']
);

Then, you can log the user with the id:

Auth::loginUsingId($id);

The user is now logged in. So you can redirect to the page as:

return Redirect::to('your/redirect/page');
0

Sign in to participate in this thread!

Eventy

Your banner here too?

tommychu tommychu Joined 13 Aug 2015

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.