Skip to content

Commit a67e73e

Browse files
committed
Whooooops!
1 parent 048449b commit a67e73e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Builders/Builder.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ public function get( $filters = [], $key = '', $byKey = false )
5151
{
5252
$urlFilters = '';
5353

54+
if( $key === '' && isset($this->defaultKey))
55+
{
56+
$key = $this->defaultKey;
57+
}
58+
5459
if ( ! $byKey )
5560
{
5661
if ( count( $filters ) > 0 )

src/Builders/InvoiceBuilder.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ class InvoiceBuilder extends Builder
66
{
77
protected $entity = 'invoices';
88
protected $model = Invoice::class;
9-
10-
public function get($filters = [], $key = 'self', $byKey = false)
11-
{
12-
return $this->get($filters, $key, $byKey);
13-
}
9+
protected $defaultKey = 'self';
1410

1511
public function getDrafts(array $filters = [])
1612
{

0 commit comments

Comments
 (0)