Working on tests

This commit is contained in:
Hillel Coren 2016-06-07 17:39:18 +03:00
parent cc55cdc1b5
commit be11054b31
2 changed files with 8 additions and 10 deletions

View File

@ -31,13 +31,13 @@ class EntityRequest extends Request {
}
$class = Utils::getEntityClass($this->entityType);
\Log::info('entity ' . $this->entityType . ' - ' . $publicId);
if (method_exists($class, 'withTrashed')) {
$this->entity = $class::scope($publicId)->withTrashed()->firstOrFail();
} else {
$this->entity = $class::scope($publicId)->firstOrFail();
}
\Log::info($this->entity);
return $this->entity;
}

View File

@ -10,7 +10,6 @@ class InvoiceRequest extends EntityRequest {
{
$invoice = parent::entity();
/*
// support loading an invoice by its invoice number
if ($this->invoice_number && ! $invoice) {
$invoice = Invoice::scope()
@ -18,7 +17,6 @@ class InvoiceRequest extends EntityRequest {
->withTrashed()
->firstOrFail();
}
*/
// eager load the invoice items
if ($invoice && ! $invoice->relationLoaded('invoice_items')) {