1 | <?php |
||
12 | class Thread extends Model |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $table = 'messenger_threads'; |
||
18 | |||
19 | protected $guarded = []; |
||
20 | |||
21 | /** |
||
22 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
23 | */ |
||
24 | public function messages() |
||
28 | |||
29 | public function addMessage($body, $userId = null) |
||
38 | |||
39 | public function subject() |
||
43 | |||
44 | public function users() |
||
51 | |||
52 | public function from() |
||
56 | |||
57 | public function to() |
||
61 | |||
62 | public function path() |
||
66 | |||
67 | public function storeMessagePath() |
||
76 | } |
||
77 |
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.