M
M
mrSeller2018-02-04 16:36:36
Laravel
mrSeller, 2018-02-04 16:36:36

How to add data to Auth::user()?

The users table has a city_id field
The cities table has a region_id field
It seemed to me that you only need to specify the links in the model, but this does not help, Auth: user() just comes with a number indicating the id of the city, but you need to specify the city (object) , and the city, in turn, indicated the region (also an object).
How to add this data to Auth:user()?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question