I\'m trying to make a profile page for my registered users. On this page the Auth\\User data will be displayed (Name, Email) but also extra profile information (city, countr
There are three options that come to my mind.
Why are you separating the user account from the profile? I can't think of a good reason to (not saying there isn't one, I just can't think of one). Combining the tables would save you database queries and completely resolve this issue. I think this would be the best option.
Create a listener on the User::created event.
User::created(function(User $user) {
$user->profile->save(Profile::create([... ]));
});
Create a user repository to manage all the data base querying. Then in the repository create method you can manually create the profile record and associate the two. Then use the repository in the Registrar instead of the Model directly