addPaths([ __DIR__.'/Website', ]); // Register the search provider registry as a singleton $this->app->singleton(SearchProviderRegistry::class); } public function boot(): void { // Load Hub translations $this->loadTranslationsFrom(__DIR__.'/Mod/Hub/Lang', 'hub'); // Register form components $this->registerFormComponents(); // Register the default search providers $this->registerSearchProviders(); } /** * Register form components with authorization support. * * Components are registered with the 'core-forms' prefix: * - * - * - * - * - * - * - */ protected function registerFormComponents(): void { // Register views namespace for form component templates $this->loadViewsFrom(dirname(__DIR__).'/resources/views', 'core-forms'); // Register class-backed form components Blade::component('core-forms.input', Input::class); Blade::component('core-forms.textarea', Textarea::class); Blade::component('core-forms.select', Select::class); Blade::component('core-forms.checkbox', Checkbox::class); Blade::component('core-forms.button', Button::class); Blade::component('core-forms.toggle', Toggle::class); Blade::component('core-forms.form-group', FormGroup::class); } /** * Register the default search providers. */ protected function registerSearchProviders(): void { $registry = $this->app->make(SearchProviderRegistry::class); // Register the built-in admin page search provider $registry->register($this->app->make(AdminPageSearchProvider::class)); } }