I'm in a project that is in production, and by default when we use a foreign key in eloquent we follow the following rule "user_id" for example to store the user id.
Only in the database that I'm working with, they put this field as " id_user
" and I'm always going to make the relationship generate an error saying that the " user_id
" field was not found. How can I make my code understand that user_id
is id_user
in my bank?