Support the ongoing development of Laravel.io →
posted 10 years ago
Authentication
Last updated 3 years 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' => 'john@example.com', '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!

Native PHP

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.

© 2025 Laravel.io - All rights reserved.