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 13
13
use Statikbe \FilamentFlexibleContentBlockPages \Filament \Form \Fields \Types \RouteMenuItemType ;
14
14
use Statikbe \FilamentFlexibleContentBlockPages \Filament \Form \Fields \Types \UrlMenuItemType ;
15
15
use Statikbe \FilamentFlexibleContentBlockPages \Models \Contracts \HasMenuLabel ;
16
+ use Statikbe \FilamentFlexibleContentBlocks \FilamentFlexibleBlocksConfig ;
16
17
17
18
class MenuItemForm
18
19
{
@@ -166,7 +167,7 @@ protected static function getRouteField(): Select
166
167
{
167
168
return Select::make (static ::FIELD_ROUTE )
168
169
->label (flexiblePagesTrans ('menu_items.form.route_lbl ' ))
169
- ->options (static :: getRouteOptions ())
170
+ ->options (FilamentFlexibleBlocksConfig:: getLinkRoutes ())
170
171
->searchable ()
171
172
->required ()
172
173
->visible (fn (Get $ get ): bool => static ::isRouteType ($ get (static ::FIELD_LINK_TYPE )))
@@ -283,10 +284,4 @@ protected static function isRouteType(?string $linkType): bool
283
284
return $ type ? $ type ->isRouteType () : false ;
284
285
}
285
286
286
- protected static function getRouteOptions (): array
287
- {
288
- $ routeType = new RouteMenuItemType ;
289
-
290
- return $ routeType ->getRouteOptions ();
291
- }
292
287
}
Original file line number Diff line number Diff line change @@ -20,8 +20,10 @@ class MenuItem extends Model
20
20
21
21
protected $ fillable = [
22
22
'menu_id ' ,
23
+ 'link_type ' ,
23
24
'label ' ,
24
25
'url ' ,
26
+ 'route ' ,
25
27
'linkable_type ' ,
26
28
'linkable_id ' ,
27
29
'target ' ,
You can’t perform that action at this time.
0 commit comments