1 | <?php |
||
9 | class Url extends Model |
||
10 | { |
||
11 | public $timestamps = false; |
||
12 | |||
13 | public $incrementing = false; |
||
14 | |||
15 | protected $fillable = ['uri', 'redirects_to']; |
||
16 | |||
17 | protected $primaryKey = 'uri'; |
||
18 | |||
19 | protected $with = ['resource', 'redirectsTo']; |
||
20 | |||
21 | protected static function boot() |
||
35 | |||
36 | public function resource() |
||
40 | |||
41 | public function redirectsTo() |
||
45 | |||
46 | public function redirectedToBy() |
||
50 | |||
51 | public function setUriAttribute($uri) |
||
61 | |||
62 | public function getUrlAttribute() |
||
66 | |||
67 | public function __toString() |
||
71 | } |
||
72 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write 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.