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

EDIT: much better answer here https://laracasts.com/discuss/channels/laravel/attach-user-id-to-profile-table

from you AuthController try this.

The trait just adds methods that do the default stuff, you can freely override them

//this will let you override the post user trait function but still access it
use AuthenticatesAndRegistersUsers{ postRegister as register;};

public function postRegister(Request $request)
{
        //Let the default function run first
	$response = $this->register($request);
	$user = $this->auth->user();
	//do anything you need here with the users data

        return $response;
}
Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

hadiab hadiab Joined 10 May 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.