File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 17
17
*/
18
18
class Menu extends Model
19
19
{
20
- use ModelTree, AdminBuilder;
20
+ use AdminBuilder, ModelTree {
21
+ ModelTree::boot as treeBoot;
22
+ }
21
23
22
24
/**
23
25
* The attributes that are mass assignable.
@@ -74,7 +76,7 @@ public function allNodes() : array
74
76
*/
75
77
protected static function boot ()
76
78
{
77
- parent :: boot ();
79
+ static :: treeBoot ();
78
80
79
81
static ::deleting (function ($ model ) {
80
82
$ model ->roles ()->detach ();
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public function index()
40
40
$ form ->icon ('icon ' , trans ('admin.icon ' ))->default ('fa-bars ' )->rules ('required ' )->help ($ this ->iconHelp ());
41
41
$ form ->text ('uri ' , trans ('admin.uri ' ));
42
42
$ form ->multipleSelect ('roles ' , trans ('admin.roles ' ))->options (Role::all ()->pluck ('name ' , 'id ' ));
43
+ $ form ->hidden ('_token ' )->default (csrf_token ());
43
44
44
45
$ column ->append ((new Box (trans ('admin.new ' ), $ form ))->style ('success ' ));
45
46
});
You can’t perform that action at this time.
0 commit comments