feat: add Postcode and Outcode Eloquent models
This commit is contained in:
27
app/Models/Outcode.php
Normal file
27
app/Models/Outcode.php
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Outcode extends Model
|
||||||
|
{
|
||||||
|
protected $primaryKey = 'outcode';
|
||||||
|
|
||||||
|
public $incrementing = false;
|
||||||
|
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $keyType = 'string';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'outcode',
|
||||||
|
'lat',
|
||||||
|
'lng',
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'lat' => 'float',
|
||||||
|
'lng' => 'float',
|
||||||
|
];
|
||||||
|
}
|
||||||
28
app/Models/Postcode.php
Normal file
28
app/Models/Postcode.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Postcode extends Model
|
||||||
|
{
|
||||||
|
protected $primaryKey = 'postcode';
|
||||||
|
|
||||||
|
public $incrementing = false;
|
||||||
|
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $keyType = 'string';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'postcode',
|
||||||
|
'outcode',
|
||||||
|
'lat',
|
||||||
|
'lng',
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'lat' => 'float',
|
||||||
|
'lng' => 'float',
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user