I have an Accounts Receivable table that has a relationship with the Customer Table and TWO relationships with a Chart of Accounts table
I searched the Eloquent documentation but did not find how I can do these two relationships with the same table. For the clients table and the first relationship with the Chart of Accounts table is quiet.
A well-summarized example of how my tables are
clientes: (id, nome, cpfcnpj)
planocontas: (id, nome, tipo)
recebimentos: (id, data, dtvco, dtpgo, valor, id_cliente, id_planoconta, id_planoconta2);
How to do the hasMany method inside the ModelContact so that it works for both the project_id and the project_id2 of the Receipts table?
I thought about creating two new tables, each for a link from the Accounts Receivable table to the Chart of Accounts table, using the Many to Many relationship.