Initial commit: full Laravel app + GPS API
This commit is contained in:
23
app/Models/GpsPoint.php
Normal file
23
app/Models/GpsPoint.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class GpsPoint extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'device_id', 'lat', 'lng', 'speed', 'altitude', 'heading',
|
||||
'recorded_at', 'meta',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'recorded_at' => 'datetime',
|
||||
'meta' => 'array',
|
||||
'lat' => 'float',
|
||||
'lng' => 'float',
|
||||
'speed' => 'float',
|
||||
'altitude' => 'float',
|
||||
'heading' => 'integer',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user