From de74170f3809e67efc55c82f5c54ec021175b1f7 Mon Sep 17 00:00:00 2001 From: Marlin Forbes Date: Sun, 18 Aug 2024 17:16:39 +0200 Subject: [PATCH] Use package name for vendor assets --- src/PackageServiceProvider.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PackageServiceProvider.php b/src/PackageServiceProvider.php index 4a737c0..1f3a9ae 100644 --- a/src/PackageServiceProvider.php +++ b/src/PackageServiceProvider.php @@ -59,7 +59,7 @@ public function boot() foreach ($this->package->configFileNames as $configFileName) { $this->publishes([ $this->package->basePath("/../config/{$configFileName}.php") => config_path("{$configFileName}.php"), - ], "{$this->package->shortName()}-config"); + ], "{$this->package->name}-config"); } if ($this->package->hasViews) { @@ -88,7 +88,7 @@ public function boot() $filePath => $this->generateMigrationName( $migrationFileName, $now->addSecond() - ), ], "{$this->package->shortName()}-migrations"); + ), ], "{$this->package->name}-migrations"); if ($this->package->runsMigrations) { $this->loadMigrationsFrom($filePath); @@ -98,13 +98,13 @@ public function boot() if ($this->package->hasTranslations) { $this->publishes([ $this->package->basePath('/../resources/lang') => $langPath, - ], "{$this->package->shortName()}-translations"); + ], "{$this->package->name}-translations"); } if ($this->package->hasAssets) { $this->publishes([ $this->package->basePath('/../resources/dist') => public_path("vendor/{$this->package->shortName()}"), - ], "{$this->package->shortName()}-assets"); + ], "{$this->package->name}-assets"); } } @@ -211,6 +211,6 @@ protected function getPackageBaseDir(): string public function packageView(?string $namespace) { - return is_null($namespace) ? $this->package->shortName() : $this->package->viewNamespace; + return is_null($namespace) ? $this->package->name : $this->package->viewNamespace; } }