'layout', 'value' => '/admin/layout/index.vue' ] ]; public function get(): array { if ($module = request()->get('module')) { $components = File::glob(CatchAdmin::getModuleViewsPath($module).'*'.DIRECTORY_SEPARATOR.'*.vue'); foreach ($components as $component) { $this->components[] = [ 'label' => Str::of($component)->explode(DIRECTORY_SEPARATOR)->pop(2)->pop(), 'value' => Str::of($component)->replace(CatchAdmin::moduleRootPath(), '')->prepend('/') ]; } } return $this->components; } }