Skip to content

Commit

Permalink
Fixed disabled item display issue
Browse files Browse the repository at this point in the history
  • Loading branch information
balajidharma committed Dec 27, 2023
1 parent 0c458b1 commit e21a4e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public static function validateMachineName($machine_name) {
return preg_match('/^[a-z0-9_-]+$/', $machine_name);
}

protected static function getMenuTree($machine_name) {
protected static function getMenuTree($machine_name, $includeDisabledItems = false) {
$menu = Menu::where('machine_name', $machine_name)->first();
if(!$menu){
throw MenuNotExists::create($machine_name);
}
return (new MenuItem)->toTree($menu->id);
return (new MenuItem)->toTree($menu->id, $includeDisabledItems);
}
}

0 comments on commit e21a4e8

Please sign in to comment.