diff --git a/src/Support/Resource.php b/src/Support/Resource.php index e7effc3..dde9de8 100644 --- a/src/Support/Resource.php +++ b/src/Support/Resource.php @@ -12,6 +12,8 @@ class Resource public $client; + protected static $ResourcesShouldPreventAccessingMissingAttributes = false; + public function __construct(Entry $client = null, $attributes = []) { $this->client = $client; @@ -21,6 +23,18 @@ public function __construct(Entry $client = null, $attributes = []) $this->fill($attributes); } + + /** + * Determine if accessing missing attributes is disabled. + * Nested Requirement originating from the Laravel 10 HasAttributes Trait + * + * @return bool + */ + public static function preventsAccessingMissingAttributes() + { + return static::$ResourcesShouldPreventAccessingMissingAttributes; + } + /** * Fill the model with an array of attributes. *