Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
Invoices | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
newFactory | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
user | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace App\Http\Models; |
4 | |
5 | use App\Http\Models\Auth\User; |
6 | use database\factories\http\models\InvoicesFactory; |
7 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
8 | |
9 | class Invoices extends Moloquent |
10 | { |
11 | use HasFactory; |
12 | protected $table = 'invoices'; |
13 | |
14 | protected $fillable = [ |
15 | 'user_id', |
16 | 'stripe_id', |
17 | 'stripe_price_id', |
18 | 'stripe_subscription_id', |
19 | 'stripe_product_id', |
20 | 'amount', |
21 | 'currency', |
22 | 'paid_at', |
23 | 'status', |
24 | 'updated_at', |
25 | 'created_at', |
26 | ]; |
27 | |
28 | protected static function newFactory() |
29 | { |
30 | return InvoicesFactory::new(); |
31 | } |
32 | |
33 | public function user() |
34 | { |
35 | return $this->belongsTo(User::class, 'user_id'); |
36 | } |
37 | } |