1 | <?php |
||
11 | class Activity extends Model implements ActivityContract |
||
12 | { |
||
13 | public $guarded = []; |
||
14 | |||
15 | protected $casts = [ |
||
16 | 'properties' => 'collection', |
||
17 | ]; |
||
18 | |||
19 | public function __construct(array $attributes = []) |
||
20 | { |
||
21 | if (! isset($this->table)) { |
||
22 | $this->setTable(config('activitylog.table_name')); |
||
23 | } |
||
24 | |||
25 | parent::__construct($attributes); |
||
26 | } |
||
27 | |||
28 | public function subject(): MorphTo |
||
36 | |||
37 | public function causer(): MorphTo |
||
41 | |||
42 | public function getExtraProperty(string $propertyName) |
||
46 | |||
47 | public function changes(): Collection |
||
55 | |||
56 | public function getChangesAttribute(): Collection |
||
60 | |||
61 | public function scopeInLog(Builder $query, ...$logNames): Builder |
||
69 | |||
70 | public function scopeCausedBy(Builder $query, Model $causer): Builder |
||
76 | |||
77 | public function scopeForSubject(Builder $query, Model $subject): Builder |
||
83 | } |
||
84 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.