protected function startResourcesPlugin()
    {
        $this->requiresPlugins(Paths::class);
        $this->onBoot('resources', function () {
            foreach ($this->viewDirs as $dirName => $namespace) {
                $viewPath = $this->resolvePath('viewsPath', compact('dirName'));
                $this->loadViewsFrom($viewPath, $namespace);
                $this->publishes([ $viewPath => $this->resolvePath('viewsDestinationPath', compact('namespace')) ], 'views');
            }

            foreach ($this->translationDirs as $dirName => $namespace) {
                $transPath = $this->resolvePath('translationPath', compact('dirName'));
                $this->loadTranslationsFrom($transPath, $namespace);
                $this->publishes([ $transPath => $this->resolvePath('translationDestinationPath', compact('namespace')) ], 'translations');
            }

            foreach ($this->assetDirs as $dirName => $namespace) {
                $this->publishes([
                    $this->resolvePath('assetsPath', compact('dirName')) => $this->resolvePath('assetsDestinationPath', compact('namespace')),
                ], 'public');
            }

            foreach ($this->migrationDirs as $dirName) {
                $migrationPaths = $this->resolvePath('migrationsPath', compact('dirName'));
                $this->loadMigrationsFrom($migrationPaths);
                if ($this->publishMigrations) {
                    $this->publishes([ $migrationPaths => $this->resolvePath('migrationDestinationPath') ], 'database');
                }
            }

            foreach ($this->seedDirs as $dirName) {
                $this->publishes([ $this->resolvePath('seedsPath', compact('dirName')) => $this->resolvePath('seedsDestinationPath') ], 'database');
            }
        });
    }