File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1313use Statikbe \FilamentFlexibleContentBlockPages \Filament \Form \Fields \Types \RouteMenuItemType ;
1414use Statikbe \FilamentFlexibleContentBlockPages \Filament \Form \Fields \Types \UrlMenuItemType ;
1515use Statikbe \FilamentFlexibleContentBlockPages \Models \Contracts \HasMenuLabel ;
16+ use Statikbe \FilamentFlexibleContentBlocks \FilamentFlexibleBlocksConfig ;
1617
1718class MenuItemForm
1819{
@@ -166,7 +167,7 @@ protected static function getRouteField(): Select
166167 {
167168 return Select::make (static ::FIELD_ROUTE )
168169 ->label (flexiblePagesTrans ('menu_items.form.route_lbl ' ))
169- ->options (static :: getRouteOptions ())
170+ ->options (FilamentFlexibleBlocksConfig:: getLinkRoutes ())
170171 ->searchable ()
171172 ->required ()
172173 ->visible (fn (Get $ get ): bool => static ::isRouteType ($ get (static ::FIELD_LINK_TYPE )))
@@ -283,10 +284,4 @@ protected static function isRouteType(?string $linkType): bool
283284 return $ type ? $ type ->isRouteType () : false ;
284285 }
285286
286- protected static function getRouteOptions (): array
287- {
288- $ routeType = new RouteMenuItemType ;
289-
290- return $ routeType ->getRouteOptions ();
291- }
292287}
Original file line number Diff line number Diff line change @@ -20,8 +20,10 @@ class MenuItem extends Model
2020
2121 protected $ fillable = [
2222 'menu_id ' ,
23+ 'link_type ' ,
2324 'label ' ,
2425 'url ' ,
26+ 'route ' ,
2527 'linkable_type ' ,
2628 'linkable_id ' ,
2729 'target ' ,
You can’t perform that action at this time.
0 commit comments