Answer the question
In order to leave comments, you need to log in
How to define a relationship with a table from another database in laravel 7?
After reading the documentation about the definitions of relations between tables, I did not find information on how to implement a relationship to the example of the User module (which is out of the box make:auth ) with any table from another database
. I need to display information about an authenticated user from a table located in another database.
Auth::user()->name ( standard solution for getting
username from database )
Auth::user()->nameothertable - something like that
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question