mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on tests
This commit is contained in:
parent
cc55cdc1b5
commit
be11054b31
@ -31,13 +31,13 @@ class EntityRequest extends Request {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$class = Utils::getEntityClass($this->entityType);
|
$class = Utils::getEntityClass($this->entityType);
|
||||||
|
\Log::info('entity ' . $this->entityType . ' - ' . $publicId);
|
||||||
if (method_exists($class, 'withTrashed')) {
|
if (method_exists($class, 'withTrashed')) {
|
||||||
$this->entity = $class::scope($publicId)->withTrashed()->firstOrFail();
|
$this->entity = $class::scope($publicId)->withTrashed()->firstOrFail();
|
||||||
} else {
|
} else {
|
||||||
$this->entity = $class::scope($publicId)->firstOrFail();
|
$this->entity = $class::scope($publicId)->firstOrFail();
|
||||||
}
|
}
|
||||||
|
\Log::info($this->entity);
|
||||||
return $this->entity;
|
return $this->entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ class InvoiceRequest extends EntityRequest {
|
|||||||
{
|
{
|
||||||
$invoice = parent::entity();
|
$invoice = parent::entity();
|
||||||
|
|
||||||
/*
|
|
||||||
// support loading an invoice by its invoice number
|
// support loading an invoice by its invoice number
|
||||||
if ($this->invoice_number && ! $invoice) {
|
if ($this->invoice_number && ! $invoice) {
|
||||||
$invoice = Invoice::scope()
|
$invoice = Invoice::scope()
|
||||||
@ -18,7 +17,6 @@ class InvoiceRequest extends EntityRequest {
|
|||||||
->withTrashed()
|
->withTrashed()
|
||||||
->firstOrFail();
|
->firstOrFail();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// eager load the invoice items
|
// eager load the invoice items
|
||||||
if ($invoice && ! $invoice->relationLoaded('invoice_items')) {
|
if ($invoice && ! $invoice->relationLoaded('invoice_items')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user