lunar
lunar copied to clipboard
Not possible to eager load Cart lines
- GetCandy version: any
- Laravel Version: any
- PHP Version: any
Expected Behaviour:
Be able to eager load in cart lines when you have a Cart
model
Actual Behaviour:
Once you have the Cart
model and try to load the lines, the totals will be blank.
Steps To Reproduce:
CartSession::current()->load('lines');
Do we need to use Lazy Eager Loading? Would it suffice to add it to the Cart model?
e.g.
class Cart extends Model
{
protected $with = ['lines'];