Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
CouponRedemption
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 coupon
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Models;
4
5use Illuminate\Database\Eloquent\Model;
6
7class CouponRedemption extends Model
8{
9    protected $fillable = ['coupon_id', 'order_id', 'customer_id', 'email', 'amount'];
10
11    protected $casts = ['amount' => 'decimal:2'];
12
13    public function coupon()
14    {
15        return $this->belongsTo(Coupon::class);
16    }
17}