In the default migration that Laravel brings to use Auth
, I made a ForeignKey with another table by calling the ID. For better understanding I put here the tables and with the following columns:
Plants (table)
ID | Nome (colunas)
Users (table created by Auth)
ID | User | planta_id
Using the {{ Auth::user()->planta_id }}
method it prints the table id plants, I wanted to use INNER JOIN
to print Nome
and not id
, but I do not know where to do this .