Added achievement data

This commit is contained in:
2026-05-10 02:28:30 +10:00
parent f2b2eaaabe
commit 217a971360
23 changed files with 479 additions and 470 deletions
+2 -2
View File
@@ -145,7 +145,7 @@ class UserFlight extends Model
protected function distance(): Attribute
{
return Attribute::make(
get: fn() => $this->calculateGreatCircleDistance()
get: fn() => round($this->calculateGreatCircleDistance())
);
}
@@ -224,7 +224,7 @@ class UserFlight extends Model
public function liveryUrl(): Attribute{
return Attribute::make(
get: function () {
if($this->airline) {
if($this->airline && $this->aircraft) {
$fileName = "{$this->airline->internal_name}_{$this->aircraft->designator}.png";
$file = public_path("img/liveries/generated/$fileName");