Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| PriceZone | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| postalCodes | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Models; |
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
| 6 | use Illuminate\Database\Eloquent\Model; |
| 7 | |
| 8 | class PriceZone extends Model |
| 9 | { |
| 10 | use HasFactory; |
| 11 | |
| 12 | protected $table = 'tbl_price_zones'; |
| 13 | |
| 14 | protected $fillable = [ |
| 15 | 'region', |
| 16 | 'zone_name', |
| 17 | 'zone_type', |
| 18 | ]; |
| 19 | |
| 20 | public function postalCodes() |
| 21 | { |
| 22 | return $this->hasMany(PricePostalCode::class, 'zone_id'); |
| 23 | } |
| 24 | } |