We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3474cd9 commit 7d401e6Copy full SHA for 7d401e6
src/Support/Resource.php
@@ -5,15 +5,17 @@
5
use MacsiDigital\API\Traits\HasAttributes;
6
use MacsiDigital\API\Traits\HasRelationships;
7
use MacsiDigital\API\Traits\HidesAttributes;
8
+use MacsiDigital\API\Support\Entry as EntryClass;
9
10
class Resource
11
{
12
use HasAttributes, HasRelationships, HidesAttributes;
13
14
public $client;
15
- public function __construct(Entry $client, $attributes = [])
16
+ public function __construct(Entry $client = null, $attributes = [])
17
18
+ if (!$client) $this->client = new EntryClass;
19
$this->client = $client;
20
21
$this->syncOriginal();
0 commit comments