Updated logo API
This commit is contained in:
@@ -29,6 +29,7 @@ class Airline extends Model
|
||||
public $timestamps = false;
|
||||
protected $appends = [
|
||||
'display_name',
|
||||
'logo_url',
|
||||
];
|
||||
|
||||
protected function displayName() : Attribute{
|
||||
@@ -41,6 +42,14 @@ class Airline extends Model
|
||||
);
|
||||
}
|
||||
|
||||
protected function logoUrl() : Attribute{
|
||||
return Attribute::make(
|
||||
get: function () {
|
||||
return config('app.logo_api_url') . "/airline/$this->internal_name/logo/tail/";
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public function country(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Country::class);
|
||||
|
||||
Reference in New Issue
Block a user