Open adriangoris opened 5 years ago
In order to get it working in the meantime I added it to my accounts model:
public function entries()
{
return $this->morphMany('\FannyPack\Ledger\LedgerEntry', 'ledgerable');
}
Hello, you did not have to create this
public function entries() { return $this->morphMany('\FannyPack\Ledger\LedgerEntry', 'ledgerable'); }
because there is a trait that you add to your model that has all required functions. Go to this url to see what I mean. https://github.com/mpaannddreew/laravel-ledger#usage.
Thanks for the feedback.
On Tue, Mar 19, 2019 at 1:24 AM Adrian notifications@github.com wrote:
In order to get it working in the meantime I added it to my accounts model:
public function entries() { return $this->morphMany('\FannyPack\Ledger\LedgerEntry', 'ledgerable'); }
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mpaannddreew/laravel-ledger/issues/6#issuecomment-474124897, or mute the thread https://github.com/notifications/unsubscribe-auth/AJxBX7QwGFUsau72vPDecTLB54Fzqvokks5vYBI3gaJpZM4b63fu .
I can insert credits and debits into the table and retrieve the balance, but i cannot retrieve the entries. It appears that entries are not being returned from withing the contoller.