Closed RyonMB closed 5 years ago
Can you share the output of dd($order->all())
?
This happens when you outright just follow the example. When you get an eloquent model, like $order = Order::findOrFail(1)
or something, you'll get a proper invoice.
Detailed description
I got a bug when I wanted to create a new Order: Integrity constraint violation: 1048 Column 'invoicable_id' cannot be null (SQL: insert into
invoices
(invoicable_id
,invoicable_type
,currency
,status
,reference
,updated_at
,created_at
)It happens when I am using this: $invoice = $order->invoices()->create([]);
Your environment
Using laravel 5.8 with php 7.3