Skip to content

Commit

Permalink
Add install command
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Oct 3, 2023
1 parent 09eaff0 commit d6559d6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/SubscriptionServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Laravelcm\Subscriptions;

use Spatie\LaravelPackageTools\Commands\InstallCommand;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;

Expand All @@ -12,11 +13,12 @@ final class SubscriptionServiceProvider extends PackageServiceProvider
public function configurePackage(Package $package): void
{
$package->name('laravel-subscriptions')
->hasConfigFile('laravel-subscriptions');
}

public function bootingPackage(): void
{
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
->hasConfigFile('laravel-subscriptions')
->hasInstallCommand(function (InstallCommand $command): void {
$command
->publishConfigFile()
->publishMigrations()
->askToStarRepoOnGitHub('laravelcm/laravel-subscriptions');
});
}
}

0 comments on commit d6559d6

Please sign in to comment.