update fix deadcode, security
This commit is contained in:
@@ -8,7 +8,6 @@ use App\Models\Invoice;
|
||||
use App\Models\InvoiceItem;
|
||||
use App\Models\Order;
|
||||
use App\Repositories\Api\BaseApiRepository;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
|
||||
class InvoiceRepository extends BaseApiRepository implements InvoiceRepositoryInterface
|
||||
{
|
||||
@@ -17,18 +16,6 @@ class InvoiceRepository extends BaseApiRepository implements InvoiceRepositoryIn
|
||||
return Invoice::class;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// getInvoice
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public function getInvoice(int $limit = 10, int $customerId = 0): LengthAwarePaginator
|
||||
{
|
||||
return $this->model
|
||||
->where('customer_id', $customerId)
|
||||
->orderByDesc('created_at')
|
||||
->paginate($limit);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// createFromOrder
|
||||
// -------------------------------------------------------------------------
|
||||
@@ -97,5 +84,4 @@ class InvoiceRepository extends BaseApiRepository implements InvoiceRepositoryIn
|
||||
// -------------------------------------------------------------------------
|
||||
// Helpers
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user