phpvms/app/Models/Navdata.php

43 lines
672 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use App\Contracts\Model;
/**
* Class Navdata
*/
class Navdata extends Model
{
public $table = 'navdata';
2018-03-21 08:40:19 +08:00
public $timestamps = false;
public $incrementing = false;
2018-03-21 08:40:19 +08:00
protected $fillable = [
'id',
'name',
'type',
'lat',
'lon',
'freq',
];
2018-03-21 08:40:19 +08:00
protected $casts = [
'type' => 'integer',
'lat' => 'float',
'lon' => 'float',
'freq' => 'float',
];
/**
* Make sure the ID is in all caps
2018-08-27 00:40:04 +08:00
*
* @param $id
*/
public function setIdAttribute($id): void
{
$this->attributes['id'] = strtoupper($id);
}
}