'css/SplashingImages.css', ]; protected array $scripts = [ __DIR__.'/../resources/dist/js/splashing-images.js' => 'js/splashing-images.js', ]; public function boot(): void { $this->app->singleton(Settings::class, fn () => $this->getSettings()); } protected static function createSettings(): ?PluginSettings { return new Settings; } public function getCpNavItem(): NavItem|array|null { return new NavItem() ->label($this->getSettings()->pluginLabel ?: 'Unsplash Images') ->href($this->handle) ->iconSvg(file_get_contents($this->getResourcesPath().'/icon-mask.svg')); } public function settingsUi(UiContext $context = new UiContext): ?Ui { $volumes = Volumes::getAllVolumes() ->map(fn (Volume $volume) => ['label' => $volume->name, 'value' => $volume->handle]) ->values() ->all(); return Ui::make([ Field::make(t('Plugin label', category: 'splashing-images'), Text::make('pluginLabel')) ->instructions(t('You can give the plugin in different name in the CP navigation here', category: 'splashing-images')), Field::make(t('Volume', category: 'splashing-images'), Choice::make('destination')->options($volumes)->placeholder(t('Select a volume', category: 'splashing-images'))) ->instructions(t('Select the volume where your images should be save', category: 'splashing-images')) ->required(), Field::make(t('Folder', category: 'splashing-images'), Text::make('folder')) ->instructions('path/to/subfolder'), ]); } }