byos_laravel/app/Models/Firmware.php
Benjamin Nussbaum 87b9b57c3d feat(#17): add commands and jobs to poll, download and update firmware
feat(#17): add commands and jobs to poll, download and update firmware

feat(#17): update firmware modal

feat(#17): add tests
2025-05-30 15:42:35 +02:00

25 lines
439 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Firmware extends Model
{
use HasFactory;
protected $guarded = ['id'];
protected function casts(): array
{
return [
'latest' => 'boolean',
];
}
public static function getLatest(): ?self
{
return self::where('latest', true)->first();
}
}