cleaned searching for flights, specific fields in admin

This commit is contained in:
Nabeel Shahzad
2017-12-04 12:05:31 -06:00
parent e032fd2dbf
commit 8d4f1efd52
5 changed files with 43 additions and 13 deletions

View File

@@ -25,10 +25,15 @@ class AirportRepository extends BaseRepository implements CacheableInterface
* Return the list of airports formatted for a select box
* @return array
*/
public function selectBoxList(): array
public function selectBoxList($add_blank=false): array
{
$retval = [];
$items = $this->all();
if ($add_blank) {
$retval[''] = '';
}
foreach ($items as $i) {
$retval[$i->icao] = $i->icao . ' - ' . $i->name;
}