| Total Complexity | 3 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class Invoice extends Model |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * The attributes that are not mass assignable. |
||
| 25 | * |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $guarded = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * The attributes that should be mutated to dates. |
||
| 32 | * |
||
| 33 | * @var array |
||
| 34 | */ |
||
| 35 | protected $dates = [ |
||
| 36 | 'created_at', |
||
| 37 | 'updated_at', |
||
| 38 | 'subscription_period_start_date', |
||
| 39 | 'subscription_period_end_date', |
||
| 40 | ]; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Get the user that owns the invoice. |
||
| 44 | * |
||
| 45 | * @return self |
||
| 46 | */ |
||
| 47 | 1 | public function user() |
|
| 48 | { |
||
| 49 | 1 | return $this->owner(); |
|
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Get the model related to the invoice. |
||
| 54 | * |
||
| 55 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 56 | */ |
||
| 57 | 1 | public function owner() |
|
| 64 | } |
||
| 65 | } |
||
| 66 |