Added Support and Analytics for Release
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Http\Controllers\Api\AirlineApiController;
|
||||
use App\Observers\FlightObserver;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -10,6 +12,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
#[ObservedBy(FlightObserver::class)]
|
||||
class UserFlight extends Model
|
||||
{
|
||||
protected $table = 'user_flights';
|
||||
@@ -56,6 +59,7 @@ class UserFlight extends Model
|
||||
'scope',
|
||||
'range',
|
||||
'region_range',
|
||||
'class_seat_combined'
|
||||
];
|
||||
|
||||
protected static function booted(): void
|
||||
@@ -95,6 +99,13 @@ class UserFlight extends Model
|
||||
);
|
||||
}
|
||||
|
||||
protected function classSeatCombined(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn() => $this->flightClass?->name
|
||||
);
|
||||
}
|
||||
|
||||
protected function departureTimeDisplay(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
|
||||
Reference in New Issue
Block a user