Replies: 2 comments 1 reply
-
Take a look here: https://github.com/spatie/laravel-package-tools#working-with-a-publishable-service-provider |
Beta Was this translation helpful? Give feedback.
0 replies
-
To publish additional files you can put the code in public function packageBooted(): void
{
$this->publishes([
__DIR__ . '/Services/MyService.php' => app_path('/Services/MyService.php'),
], 'package-services');
} However, to publish using stubs, you have to write your own logic to replace the placeholders. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
my package install config file and migration, but during installation I want to also copy one Service for next customization. I need to do something like this:
But I don't know where to put it...
How can I extend InstallCommand in MyPackageServiceProvider to publish it in the
app/Services
directory?I bought course, but this topic was not covered.
Beta Was this translation helpful? Give feedback.
All reactions