Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| CustomerAnswer | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| getUpdatedAtColumn | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| customer | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| answer | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Models; |
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Relations\Pivot; |
| 6 | |
| 7 | class CustomerAnswer extends Pivot |
| 8 | { |
| 9 | /** |
| 10 | * Inhibit update_at column as we only have |
| 11 | * created_at |
| 12 | * |
| 13 | * @return null |
| 14 | */ |
| 15 | public function getUpdatedAtColumn() |
| 16 | { |
| 17 | return null; |
| 18 | } |
| 19 | |
| 20 | // * RELATIONS |
| 21 | |
| 22 | /** |
| 23 | * Customer belongsTo relation |
| 24 | * |
| 25 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 26 | */ |
| 27 | public function customer() |
| 28 | { |
| 29 | return $this->belongsTo(Customer::class); |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Customer belongsTo relation |
| 34 | * |
| 35 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 36 | */ |
| 37 | public function answer() |
| 38 | { |
| 39 | return $this->belongsTo(Answer::class); |
| 40 | } |
| 41 | } |