1 | <?php |
||
8 | class Page extends HasContent |
||
9 | { |
||
10 | use Sluggable, SoftDeletes; |
||
11 | |||
12 | /** |
||
13 | * The table associated with the model. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $table = 'pages'; |
||
18 | |||
19 | /** |
||
20 | * The attributes that are mass assignable. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $fillable = [ |
||
25 | 'name', 'slug', 'visible', 'order', |
||
26 | ]; |
||
27 | |||
28 | /** |
||
29 | * Return all visible pages. |
||
30 | * |
||
31 | * @param bool $order If true, order pages by 'order'. |
||
32 | * |
||
33 | * @return \Illuminate\Support\Collection |
||
34 | */ |
||
35 | public static function allVisible($order = true) |
||
41 | |||
42 | /** |
||
43 | * Return all hidden pages. |
||
44 | * |
||
45 | * @param bool $order If true, order pages by 'order'. |
||
46 | * |
||
47 | * @return \Illuminate\Support\Collection |
||
48 | */ |
||
49 | public static function allHidden($order = true) |
||
55 | |||
56 | /** |
||
57 | * Return all pages ordered by 'order'. |
||
58 | * |
||
59 | * @return \Illuminate\Support\Collection |
||
60 | */ |
||
61 | public static function allOrdered() |
||
67 | |||
68 | /** |
||
69 | * Get all pages with given block name. |
||
70 | * |
||
71 | * @param string $blockName Name of block. |
||
72 | * |
||
73 | * @return \Illuminate\Support\Collection |
||
74 | */ |
||
75 | public static function hasBlockNamed($blockName) |
||
79 | |||
80 | /** |
||
81 | * Get all pages with given image name. |
||
82 | * |
||
83 | * @param string $imageName Name of image. |
||
84 | * |
||
85 | * @return \Illuminate\Support\Collection |
||
86 | */ |
||
87 | public static function hasImageNamed($imageName) |
||
91 | |||
92 | /** |
||
93 | * Get all pages with given link name. |
||
94 | * |
||
95 | * @param string $linkName Name of link. |
||
96 | * |
||
97 | * @return \Illuminate\Support\Collection |
||
98 | */ |
||
99 | public static function hasLinkNamed($linkName) |
||
103 | |||
104 | /** |
||
105 | * Return the page id. |
||
106 | * |
||
107 | * @return int |
||
108 | */ |
||
109 | public function id() |
||
113 | |||
114 | /** |
||
115 | * Return the page name. |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | public function name() |
||
123 | |||
124 | /** |
||
125 | * Return the page slug. |
||
126 | * |
||
127 | * @return string |
||
128 | */ |
||
129 | public function slug() |
||
133 | |||
134 | /** |
||
135 | * Return the page order value. |
||
136 | * |
||
137 | * @return int |
||
138 | */ |
||
139 | public function order() |
||
143 | } |
||
144 |
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.