Skip to content

Commit 5177c7c

Browse files
committed
fixed dynamic property creation
1 parent f0fba35 commit 5177c7c

File tree

1 file changed

+52
-13
lines changed

1 file changed

+52
-13
lines changed

src/MenuItem.php

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,12 @@
44

55
use Closure;
66
use Collective\Html\HtmlFacade as HTML;
7-
use Illuminate\Contracts\Support\Arrayable as ArrayableContract;
7+
use Illuminate\Contracts\Support\Arrayable;
88
use Illuminate\Support\Facades\Request;
99
use Illuminate\Support\Arr;
1010
use Illuminate\Support\Str;
1111

12-
/**
13-
* @property string url
14-
* @property string route
15-
* @property string title
16-
* @property string name
17-
* @property string icon
18-
* @property int parent
19-
* @property array attributes
20-
* @property bool active
21-
* @property int order
22-
*/
23-
class MenuItem implements ArrayableContract
12+
class MenuItem implements Arrayable
2413
{
2514
/**
2615
* Array properties.
@@ -55,6 +44,56 @@ class MenuItem implements ArrayableContract
5544
'hideWhen',
5645
];
5746

47+
/**
48+
* @var string
49+
*/
50+
protected $url;
51+
52+
/**
53+
* @var string
54+
*/
55+
protected $route;
56+
57+
/**
58+
* @var string
59+
*/
60+
protected $fragment;
61+
62+
/**
63+
* @var string
64+
*/
65+
protected $title;
66+
67+
/**
68+
* @var string
69+
*/
70+
protected $name;
71+
72+
/**
73+
* @var string
74+
*/
75+
protected $icon;
76+
77+
/**
78+
* @var int
79+
*/
80+
protected $parent;
81+
82+
/**
83+
* @var array
84+
*/
85+
protected $attributes;
86+
87+
/**
88+
* @var bool
89+
*/
90+
protected $active;
91+
92+
/**
93+
* @var int
94+
*/
95+
protected $order;
96+
5897
/**
5998
* The hideWhen callback.
6099
*

0 commit comments

Comments
 (0)