| 1 | <?php |
||
| 12 | class Version extends Eloquent |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | public $table = "versions"; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $primaryKey = "version_id"; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Sets up the relation |
||
| 27 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
| 28 | */ |
||
| 29 | public function versionable() |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Return the user responsible for this version |
||
| 36 | * @return mixed |
||
| 37 | */ |
||
| 38 | public function getResponsibleUserAttribute() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Return the versioned model |
||
| 46 | * @return Model |
||
| 47 | */ |
||
| 48 | public function getModel() |
||
| 57 | |||
| 58 | |||
| 59 | /** |
||
| 60 | * Revert to the stored model version make it the current version |
||
| 61 | * |
||
| 62 | * @return Model |
||
| 63 | */ |
||
| 64 | public function revert() |
||
| 75 | |||
| 76 | } |
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.