You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,12 @@ It is heavvly inspired by the renvex/laravel-subscriptions package, just simpler
12
12
13
13
Sorry, My point is that the renvex packages seems to be abandond.
14
14
15
+
## Payments
16
+
17
+
- Payment support is in the works, so stay tuned.
18
+
- We will most likley use laraveldaily/laravel-invoices and then a payment package
19
+
20
+
15
21
## Installation
16
22
17
23
You can install the package via composer:
@@ -41,10 +47,29 @@ return [
41
47
42
48
## Usage
43
49
50
+
### Add Subscriptions to your model
51
+
52
+
For the sake of simplicity there is a trait that can be added to any model.
53
+
54
+
The most common use case is to add Subscription functionality to your User model just use the `Rabol\SimpleSubscription\Traits\HasSubscriptions` trait like this:
55
+
44
56
```php
45
-
Comming soon
57
+
namespace App\Models;
58
+
59
+
use Rabol\SimpleSubscription\Traits\HasSubscriptions;
60
+
use Illuminate\Foundation\Auth\User as Authenticatable;
61
+
62
+
class User extends Authenticatable
63
+
{
64
+
use HasSubscriptions;
65
+
}
46
66
```
47
67
68
+
That's it, now you can use subscriptions on your user modelwe only have to use that trait in our User model! Now your users may subscribe to plans.
0 commit comments