Remove pagination from getting airlines

This commit is contained in:
Nabeel Shahzad 2021-06-10 12:41:23 -04:00
parent 601a17e1e6
commit 531489bfde

View File

@ -16,9 +16,8 @@ class AirlineController extends Controller
* *
* @param AirlineRepository $airlineRepo * @param AirlineRepository $airlineRepo
*/ */
public function __construct( public function __construct(AirlineRepository $airlineRepo)
AirlineRepository $airlineRepo {
) {
$this->airlineRepo = $airlineRepo; $this->airlineRepo = $airlineRepo;
} }
@ -31,9 +30,7 @@ class AirlineController extends Controller
*/ */
public function index(Request $request) public function index(Request $request)
{ {
$airports = $this->airlineRepo $airports = $this->airlineRepo->whereOrder(['active' => true], 'name');
->whereOrder(['active' => true], 'name', 'asc')
->paginate();
return AirlineResource::collection($airports); return AirlineResource::collection($airports);
} }