Add /api/airports with pagination to return all the airports #120
This commit is contained in:
@@ -19,6 +19,15 @@ class AirportController extends AppBaseController
|
||||
$this->airportRepo = $airportRepo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all the airports, paginated
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$airports = $this->airportRepo->orderBy('icao', 'asc')->paginate(50);
|
||||
return AirportResource::collection($airports);
|
||||
}
|
||||
|
||||
/**
|
||||
* Do a lookup, via vaCentral, for the airport information
|
||||
* @param $id
|
||||
|
||||
Reference in New Issue
Block a user