Migration Fix

This commit is contained in:
2026-04-01 16:41:18 +10:00
parent dd69f1e623
commit e4e5afafa7
+16
View File
@@ -25,9 +25,17 @@ class LogoController extends Controller
{ {
$airline = Airline::where('IATA_code', strtoupper($code)) $airline = Airline::where('IATA_code', strtoupper($code))
->whereNotNull('logo') ->whereNotNull('logo')
->where('active', true)
->latest('id') ->latest('id')
->first(); ->first();
if (!$airline) {
$airline = Airline::where('IATA_code', strtoupper($code))
->whereNotNull('logo')
->latest('id')
->first();
}
return $this->getAirlineLogo($airline); return $this->getAirlineLogo($airline);
} }
@@ -35,9 +43,17 @@ class LogoController extends Controller
{ {
$airline = Airline::where('ICAO_code', strtoupper($code)) $airline = Airline::where('ICAO_code', strtoupper($code))
->whereNotNull('logo') ->whereNotNull('logo')
->where('active', true)
->latest('id') ->latest('id')
->first(); ->first();
if (!$airline) {
$airline = Airline::where('ICAO_code', strtoupper($code))
->whereNotNull('logo')
->latest('id')
->first();
}
return $this->getAirlineLogo($airline); return $this->getAirlineLogo($airline);
} }