File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ public function adminMenuItems(array $menus = [])
173173 $ children [] = MenuItem::make (_d (':name Categories ' , ['name ' => Str::singular ($ name )]))
174174 ->controller (CategoriesController::class)
175175 ->can ('view_ ' . Str::singular ($ post_type ->permission_slug ) . '_categories ' )
176- // ->active(optional(request()->route('category_type'))->slug == Str::singular($post_type->slug) . '-categories')
176+ ->active (optional (request ()->route ('category_type ' ))->slug == Str::singular ($ post_type ->slug ) . '-categories ' )
177177// ->url(config('cms.should_translate')
178178// ? translate_route('admin.categories.index', Str::singular($post_type->slug) . '-categories')
179179// : route('admin.categories.index', Str::singular($post_type->slug) . '-categories')
Original file line number Diff line number Diff line change @@ -106,5 +106,15 @@ public function getFeatureCollectionName($feature): ?string
106106
107107 return PostTypeFeatures::getCollectionName ($ feature );
108108 }
109+
110+ /**
111+ * Slugify the value
112+ *
113+ * @param $value
114+ */
115+ public function setSlugAttribute ($ value )
116+ {
117+ $ this ->attributes ['slug ' ] = Str::slug ($ value );
118+ }
109119}
110120
You can’t perform that action at this time.
0 commit comments