style: align Postcode/Outcode models with house Fillable+casts convention

This commit is contained in:
Ovidiu U
2026-04-22 12:07:23 +01:00
parent 64a7cc3de5
commit 55c81fab7b
2 changed files with 22 additions and 25 deletions

View File

@@ -2,26 +2,25 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
#[Fillable(['outcode', 'lat', 'lng'])]
class Outcode extends Model
{
public $timestamps = false;
protected $primaryKey = 'outcode';
public $incrementing = false;
public $timestamps = false;
protected $keyType = 'string';
protected $fillable = [
'outcode',
'lat',
'lng',
];
protected $casts = [
'lat' => 'float',
'lng' => 'float',
];
protected function casts(): array
{
return [
'lat' => 'float',
'lng' => 'float',
];
}
}

View File

@@ -2,27 +2,25 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
#[Fillable(['postcode', 'outcode', 'lat', 'lng'])]
class Postcode extends Model
{
public $timestamps = false;
protected $primaryKey = 'postcode';
public $incrementing = false;
public $timestamps = false;
protected $keyType = 'string';
protected $fillable = [
'postcode',
'outcode',
'lat',
'lng',
];
protected $casts = [
'lat' => 'float',
'lng' => 'float',
];
protected function casts(): array
{
return [
'lat' => 'float',
'lng' => 'float',
];
}
}