yaroslawww /
laravel-uk-towns
| 1 | <?php |
||
| 2 | |||
| 3 | namespace UKTowns\Models; |
||
| 4 | |||
| 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
||
| 6 | use Illuminate\Database\Eloquent\Model; |
||
| 7 | |||
| 8 | class GeoPostcode extends Model |
||
| 9 | { |
||
| 10 | use HasFactory, HasCoordinates; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 11 | |||
| 12 | protected $primaryKey = 'postcode'; |
||
| 13 | |||
| 14 | protected $keyType = 'string'; |
||
| 15 | |||
| 16 | public $incrementing = false; |
||
| 17 | |||
| 18 | protected $guarded = []; |
||
| 19 | |||
| 20 | 2 | public function getTable(): string |
|
| 21 | { |
||
| 22 | 2 | return config('uk-towns.tables.postcodes'); |
|
| 23 | } |
||
| 24 | |||
| 25 | protected static function newFactory(): GeoPostcodeFactory |
||
| 26 | { |
||
| 27 | return GeoPostcodeFactory::new(); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |