Initial commit: full Laravel app + GPS API

This commit is contained in:
2025-08-29 13:36:23 +10:00
commit 6eb2ece099
60 changed files with 10813 additions and 0 deletions

23
app/Models/GpsPoint.php Normal file
View 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',
];
}

48
app/Models/User.php Normal file
View File

@@ -0,0 +1,48 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var list<string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
}