phpvms/app/Models/Navdata.php
Nabeel S 23eb9dcbda
384 Laravel 6 changes (#385)
* 384 Laravel 6 changes

* Library versions

* Update package versions

* Add keyType to models

* Remove unused dependencies

* StyleCI fixes

* Fix models for test

* Fix tests output and update test runner

* Unused imports

* Update exceptions handler

* Fix login page
2019-09-13 08:05:02 -04:00

41 lines
682 B
PHP

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