Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
2 / 2 |
| CustomerOptInHistory | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
2 / 2 |
| customer | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| brand | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Models; |
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
| 6 | use Illuminate\Database\Eloquent\Model; |
| 7 | |
| 8 | class CustomerOptInHistory extends Model |
| 9 | { |
| 10 | use HasFactory; |
| 11 | |
| 12 | /** |
| 13 | * The table associated with the model. |
| 14 | * |
| 15 | * @var string |
| 16 | */ |
| 17 | protected $table = "customer_opt_in_history"; |
| 18 | |
| 19 | // * RELATIONS |
| 20 | |
| 21 | /** |
| 22 | * Customer BelongsTo relation |
| 23 | * |
| 24 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 25 | */ |
| 26 | public function customer() |
| 27 | { |
| 28 | return $this->belongsTo(Customer::class); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Brand BelongsTo relation |
| 33 | * |
| 34 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 35 | */ |
| 36 | public function brand() |
| 37 | { |
| 38 | return $this->belongsTo(Brand::class); |
| 39 | } |
| 40 | } |