File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 <h3>π Package for easily attaching subscriptions to Laravel eloquent models</h3>
4343</div >
4444
45+ <br >
46+
4547# πΏ Installation
4648
49+ ### β Composer
50+
4751You can install the package via composer:
4852
4953```
5054composer require yuges-code/laravel-subscribable
5155```
5256
57+ ### β Publishing Config
58+
59+ Publishing the config file (config/subscribable.php) is optional:
60+
61+ ```
62+ php artisan vendor:publish --provider="Yuges\Subscribable\Providers\SubscribableServiceProvider" --tag="subscribable-config"
63+ ```
64+
65+ ### β Publishing Migrations
66+
67+ You need to publish the migration to create the subscriptions table:
68+
69+ ```
70+ php artisan vendor:publish --provider="Yuges\Subscribable\Providers\SubscribableServiceProvider" --tag="subscribable-migrations"
71+ ```
72+
73+ ### β Running Migrations
74+
75+ After that, you need to run migrations:
76+
77+ ```
78+ php artisan migrate
79+ ```
80+
81+ <br >
82+
5383# π§ͺ Running Tests
5484
85+ ### β PHPUnit tests
86+
5587To run tests, run the following command:
5688
5789```
5890composer test
5991```
6092
93+ <br >
94+
6195# βοΈ License
6296
6397The MIT License (MIT). Please see [ License File] ( LICENSE ) for more information.
6498
99+ <br >
100+
65101# ππΌββοΈ Authors Information
66102
67103Created in 2025 by:
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public function subscriptions(): MorphMany
2828
2929 public function subscribableSubscriptions (): MorphMany
3030 {
31- return $ this ->morphMany (Config::getSubscriptionClass (), 'subscribable ' );
31+ return $ this ->morphMany (Config::getSubscriptionClass (Subscription::class ), 'subscribable ' );
3232 }
3333
3434 public function latestSubscription (): MorphOne
You canβt perform that action at this time.
0 commit comments