Skip to content

Commit e56cf8a

Browse files
committed
improvements
1 parent 18c68d9 commit e56cf8a

4 files changed

Lines changed: 8 additions & 15 deletions

File tree

database/migrations/0000_00_00_000000_create_features_table.php renamed to database/migrations/create_features_table.php

File renamed without changes.
File renamed without changes.

database/migrations/0000_00_00_000000_create_subscriptions_table.php renamed to database/migrations/create_subscriptions_table.php

File renamed without changes.

src/Providers/SubscribableServiceProvider.php

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
class SubscribableServiceProvider extends PackageServiceProvider
1313
{
14+
protected string $name = 'laravel-subscribable';
15+
1416
public function configure(Package $package): void
1517
{
1618
$subscription = Config::getSubscriptionClass(Subscription::class);
@@ -20,22 +22,13 @@ public function configure(Package $package): void
2022
}
2123

2224
$package
25+
->hasName($this->name)
2326
->hasConfig('subscribable')
27+
->hasMigrations([
28+
'create_plans_table',
29+
'create_features_table',
30+
'create_subscriptions_table',
31+
])
2432
->hasObserver($subscription, SubscriptionObserver::class);
2533
}
26-
27-
public function packageBooted(): void
28-
{
29-
$this->publishes([
30-
__DIR__.'/../../config/subscribable.php' => config_path('subscribable.php')
31-
], 'subscribable-config');
32-
33-
$this->publishes([
34-
__DIR__.'/../../database/migrations/' => database_path('migrations')
35-
], 'subscribable-migrations');
36-
37-
$this->publishes([
38-
__DIR__.'/../../database/seeders/' => database_path('seeders')
39-
], 'subscribable-seeders');
40-
}
4134
}

0 commit comments

Comments
 (0)