1 | <?php |
||
19 | class DocsPage extends Model |
||
20 | { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $table = 'docs_pages'; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $fillable = [ |
||
30 | 'identify', |
||
31 | 'hash', |
||
32 | 'title', |
||
33 | 'title', |
||
34 | 'content_source', |
||
35 | 'priority', |
||
36 | 'nav', |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $casts = [ |
||
43 | 'nav' => 'collection', |
||
44 | ]; |
||
45 | |||
46 | /** |
||
47 | * @return BelongsTo |
||
48 | */ |
||
49 | public function category(): BelongsTo |
||
53 | |||
54 | /** |
||
55 | * @return BelongsTo |
||
56 | */ |
||
57 | public function docs(): BelongsTo |
||
61 | |||
62 | /** |
||
63 | * @param array ...$level |
||
64 | * @return Collection |
||
65 | */ |
||
66 | public function getNav(...$level): Collection |
||
73 | |||
74 | /** |
||
75 | * @param Builder $builder |
||
76 | * @param string $version |
||
77 | * @return Builder |
||
78 | */ |
||
79 | public static function scopeWhereVersion(Builder $builder, string $version): Builder |
||
85 | } |
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.