Skip to content

Commit

Permalink
Update PackageServiceProvider.php
Browse files Browse the repository at this point in the history
Simplify Polyfill
  • Loading branch information
gaetan-hexadog authored Aug 29, 2024
1 parent abac5d8 commit d070f81
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/PackageServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,8 @@ public function boot()

$providers = [];

foreach ($providersName as $key => $publishableProviderName) {
$assoc = [$this->package->basePath("/../resources/stubs/{$publishableProviderName}.php.stub") => base_path("app/Providers/{$publishableProviderName}.php")];

foreach ($assoc as $mapKey => $mapValue) {
$providers[$mapKey] = $mapValue;
}
foreach ($providersName as $publishableProviderName) {
$providers[$this->package->basePath("/../resources/stubs/{$publishableProviderName}.php.stub")] = base_path("app/Providers/{$publishableProviderName}.php");
}

$this->publishes($providers, "{$this->package->shortName()}-provider");
Expand Down

0 comments on commit d070f81

Please sign in to comment.