Support the ongoing development of Laravel.io →
posted 10 years ago
Eloquent

Hello,

Im working on a financial app. Now I have this model :

description : string ; 
account_from : integer; 
account_to: integer ; 
amount debet : integer ; 
amount credit; integer 

So far so good.

So if I have a invoice it will be:

description :  invoice 1 
account_from :  1200
account_to : 8000 
amount_debet:  200 

but if I have 40 invoices that means that I have 40 items already in my database.

description :  invoice {1,2,3)  
account_from :  { 1200, 1201, 1202 } 
account_to : { 8000, 2000, 3000}  
amount_debet:  13000

But I think It will be very difficult to find out which amount is open on a account.

Is there a better way ?

Roelof

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.