I have 3 tables in pgsql
.1.users table with column as name,email and client_id.
2. countries table with columns as name,client_id
3.students table with columns as name and client_id.
can i make foreign key from users table client_id field to countries and students linked to client_id.If not what can be the best way to achieve eloquent relationship to fetch client id of users table to countries and students...i just need users table data fetched to several tables linked by clientid..
@devamit2018 it will fetch just with the model, but for performance and reliability it is good to have the foreign keys.. if you use Laravel > 8 version then this :