| 1 | <?php |
||
| 8 | class Video extends Model |
||
| 9 | { |
||
| 10 | protected $table = 'laravel_videoables'; |
||
| 11 | protected $fillable = ['source', 'code', 'title', 'width', 'height', 'videoable_id', 'videoable_type']; |
||
| 12 | |||
| 13 | public function videoable() |
||
| 14 | { |
||
| 15 | return $this->morphTo(); |
||
| 16 | } |
||
| 17 | |||
| 18 | 4 | public function getEmbed() |
|
| 28 | } |
||
| 29 |
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.