I have a model which I'm trying to query using eloquent.
In my table I have the following columns.
Order ID
Invoiced -> default(0)
Delivered -> default(0)
I want to query this table and only show orders where not invoiced and not delivered but can show orders where are delivered but not invoiced or are invoiced but not delivered.
How would I do this in Eloquent?
Here's my code:
$orders = Order::where('delivered', '<>', 1)->where('invoiced', '<>', 1)->get();
The above works however when I update an order to delivered but the invoice is still outstanding this removes the order from the list.
I want to exclude all orders where the are complete i.e. delivered and invoiced.