Migration Fix
This commit is contained in:
@@ -24,9 +24,17 @@ class LogoController extends Controller
|
||||
public function getLogoByIATACode(string $code)
|
||||
{
|
||||
$airline = Airline::where('IATA_code', strtoupper($code))
|
||||
->whereNotNull('logo')
|
||||
->latest('id')
|
||||
->first();
|
||||
->whereNotNull('logo')
|
||||
->where('active', true)
|
||||
->latest('id')
|
||||
->first();
|
||||
|
||||
if (!$airline) {
|
||||
$airline = Airline::where('IATA_code', strtoupper($code))
|
||||
->whereNotNull('logo')
|
||||
->latest('id')
|
||||
->first();
|
||||
}
|
||||
|
||||
return $this->getAirlineLogo($airline);
|
||||
}
|
||||
@@ -34,9 +42,17 @@ class LogoController extends Controller
|
||||
public function getLogoByICAOCode(string $code)
|
||||
{
|
||||
$airline = Airline::where('ICAO_code', strtoupper($code))
|
||||
->whereNotNull('logo')
|
||||
->latest('id')
|
||||
->first();
|
||||
->whereNotNull('logo')
|
||||
->where('active', true)
|
||||
->latest('id')
|
||||
->first();
|
||||
|
||||
if (!$airline) {
|
||||
$airline = Airline::where('ICAO_code', strtoupper($code))
|
||||
->whereNotNull('logo')
|
||||
->latest('id')
|
||||
->first();
|
||||
}
|
||||
|
||||
return $this->getAirlineLogo($airline);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user