Merge remote-tracking branch 'origin/main' into fix-achievement-category-ordering
This commit is contained in:
@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
@@ -271,6 +272,16 @@ class UserFlight extends Model
|
||||
}
|
||||
|
||||
|
||||
public function ignoreMissingAirline(): HasOne
|
||||
{
|
||||
return $this->hasOne(UserFlightIgnoreMissingAirline::class);
|
||||
}
|
||||
|
||||
public function isIgnoringMissingAirline(): bool
|
||||
{
|
||||
return $this->ignoreMissingAirline()->exists();
|
||||
}
|
||||
|
||||
public function aircraft(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Aircraft::class);
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class UserFlightIgnoreMissingAirline extends Model
|
||||
{
|
||||
protected $table = 'user_flights_ignore_missing_airlines';
|
||||
|
||||
protected $fillable = [
|
||||
'user_flight_id',
|
||||
];
|
||||
|
||||
public function userFlight(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(UserFlight::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user