Moved to Vue

This commit is contained in:
2026-04-02 22:01:38 +10:00
parent 4adba94109
commit 0b14b40fd6
68 changed files with 4853 additions and 306 deletions
+18 -39
View File
@@ -21,46 +21,25 @@ class LogoController extends Controller
]);
}
public function getLogoByIATACode(string $code)
{
$airline = Airline::where('IATA_code', strtoupper($code))
->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);
}
public function getLogoByICAOCode(string $code)
{
$airline = Airline::where('ICAO_code', strtoupper($code))
->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);
}
public function getLogoByCode(string $code){
return strlen($code) == 2
? $this->getLogoByIATACode($code)
: $this->getLogoByICAOCode($code);
$column = strlen($code) == 2
? 'IATA_code'
: 'ICAO_code';
$airline = Airline::where($column, strtoupper($code))
->whereNotNull('logo')
->where('active', true)
->latest('id')
->first();
if (!$airline) {
$airline = Airline::where($column, strtoupper($code))
->whereNotNull('logo')
->latest('id')
->first();
}
return $this->getAirlineLogo($airline);
}
}