| 1 | <?php |
||
| 18 | class Docs extends Model |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $table = 'docs'; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $fillable = [ |
||
| 29 | 'title', |
||
| 30 | 'content_source', |
||
| 31 | 'priority', |
||
| 32 | // Github |
||
| 33 | 'github_org', |
||
| 34 | 'github_repo', |
||
| 35 | 'github_branch', |
||
| 36 | 'github_file', |
||
| 37 | 'github_hash', |
||
| 38 | ]; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @var array |
||
| 42 | */ |
||
| 43 | protected $casts = [ |
||
| 44 | 'nav' => 'collection' |
||
| 45 | ]; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return BelongsTo |
||
| 49 | */ |
||
| 50 | public function category(): BelongsTo |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param array ...$level |
||
| 57 | * @return Collection |
||
| 58 | */ |
||
| 59 | public function getNav(...$level): Collection |
||
| 66 | } |
||
| 67 |
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@propertyannotation 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.