| 1 | <?php namespace Modules\Menu\Entities;  | 
            ||
| 7 | class Menuitem extends Model  | 
            ||
| 8 | { | 
            ||
| 9 | use Translatable, NestableTrait;  | 
            ||
| 10 | |||
| 11 | public $translatedAttributes = ['title', 'uri', 'url', 'status'];  | 
            ||
| 12 | protected $fillable = [  | 
            ||
| 13 | 'menu_id',  | 
            ||
| 14 | 'page_id',  | 
            ||
| 15 | 'parent_id',  | 
            ||
| 16 | 'position',  | 
            ||
| 17 | 'target',  | 
            ||
| 18 | 'module_name',  | 
            ||
| 19 | 'title',  | 
            ||
| 20 | 'uri',  | 
            ||
| 21 | 'url',  | 
            ||
| 22 | 'status',  | 
            ||
| 23 | 'is_root',  | 
            ||
| 24 | 'icon'  | 
            ||
| 25 | ];  | 
            ||
| 26 | protected $table = 'menu__menuitems';  | 
            ||
| 27 | |||
| 28 | /**  | 
            ||
| 29 | * For nested collection  | 
            ||
| 30 | *  | 
            ||
| 31 | * @var array  | 
            ||
| 32 | */  | 
            ||
| 33 | public $children = [];  | 
            ||
| 34 | |||
| 35 | public function menu()  | 
            ||
| 39 | |||
| 40 | /**  | 
            ||
| 41 | * Make the current menu item child of the given root item  | 
            ||
| 42 | * @param Menuitem $rootItem  | 
            ||
| 43 | */  | 
            ||
| 44 | public function makeChildOf(Menuitem $rootItem)  | 
            ||
| 49 | |||
| 50 | /**  | 
            ||
| 51 | * Check if the current menu item is the root  | 
            ||
| 52 | * @return bool  | 
            ||
| 53 | */  | 
            ||
| 54 | public function isRoot()  | 
            ||
| 58 | |||
| 59 | /**  | 
            ||
| 60 | * Check if page_id is empty and returning null instead empty string  | 
            ||
| 61 | * @return number  | 
            ||
| 62 | */  | 
            ||
| 63 | public function setPageIdAttribute($value)  | 
            ||
| 67 | }  | 
            ||
| 68 | 
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@propertyannotation 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.