Fix for Zapier search failure

This commit is contained in:
Hillel Coren 2017-03-20 13:56:24 +02:00
parent 546e1b56dc
commit 72c0365aee

View File

@ -17,7 +17,11 @@ class InvoiceRequest extends EntityRequest
$invoice = Invoice::scope() $invoice = Invoice::scope()
->whereInvoiceNumber($this->invoice_number) ->whereInvoiceNumber($this->invoice_number)
->withTrashed() ->withTrashed()
->firstOrFail(); ->first();
if (! $invoice) {
abort(404);
}
} }
// eager load the invoice items // eager load the invoice items