Last change
on this file was dfae77e, checked in by Igor Danilovski <igor_danilovski@…>, 2 years ago |
|
-
Property mode
set to
100644
|
File size:
898 bytes
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | namespace App\Models;
|
---|
4 |
|
---|
5 | use Illuminate\Database\Eloquent\Factories\HasFactory;
|
---|
6 | use Illuminate\Database\Eloquent\Model;
|
---|
7 | use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
---|
8 | use Laravel\Cashier\Subscription as CashierSubscription;
|
---|
9 |
|
---|
10 | class Transaction extends Model
|
---|
11 | {
|
---|
12 | use HasFactory;
|
---|
13 |
|
---|
14 | protected $table = 'transactions';
|
---|
15 |
|
---|
16 | /**
|
---|
17 | * The attributes that are mass assignable.
|
---|
18 | *
|
---|
19 | * @var array<int, string>
|
---|
20 | */
|
---|
21 | protected $fillable = [
|
---|
22 | 'name',
|
---|
23 | 'stripe_id',
|
---|
24 | 'stripe_price',
|
---|
25 | 'quantity',
|
---|
26 | 'offer_id',
|
---|
27 | 'invoice_id',
|
---|
28 | ];
|
---|
29 |
|
---|
30 | /**
|
---|
31 | * The attributes that should be cast.
|
---|
32 | *
|
---|
33 | * @var array<string, string>
|
---|
34 | */
|
---|
35 | protected $casts = [
|
---|
36 | 'trial_ends_at' => 'datetime',
|
---|
37 | 'ends_at' => 'datetime',
|
---|
38 | ];
|
---|
39 |
|
---|
40 | public function offer(): BelongsTo
|
---|
41 | {
|
---|
42 | return $this->belongsTo(Offer::class);
|
---|
43 | }
|
---|
44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.