Flight Page Order

Is there any way to change the order that the flight cards appear on the flights page. By default it orders them by the flight number but I’d like to change that so it orders them by the departure time.

 

I’m assuming it’s part of the code in the “table.blade.php” file. I did try to amend:

 

 <a class=“text-c” href=“{{ route(‘frontend.flights.show’, [$flight->id]) }}”>

 

to:

 

 <a class=“text-c” href=“{{ route(‘frontend.flights.show’, [$flight->dep_time]) }}”>

 

but that doesn’t appear to work.

 

 

What you changed is not order related at all… It is the link to open a flight and it will not work with your example.

 

And you can not change the order of the results even if you try with some java tricks, only visible page will be ordered.

 

Safe flights

1 Like

Thank you, it was worth an ask. Is it possible to add something to the search blade so that you can look for flights departing within a certain time instead? For example, in the next 1 hour, 2 hours, 4 hours?

I tried searching for an example code via google but nothing seemed to be suitable.

image.png.2e481c844d52f1c18d43800267a76c2e.png

 

Anything other than the ones above can NOT be done without core changes.

 

So your answer is again negative, you can not change only a blade file and expect a change/search/filter like that.

 

Technically it can be done, considering that all your flights do have scheduled departure times (STD) defined, then a new search option like “departing in next … hours” can be built or something with a dropdown (fixed selections) can be implemented. But both will need core v7 changes and matching blade updates.

 

If you have new ideas or requests for new features, you can use GitHub > Issues > New Issue > Feature Request path to fill in some details. Forum posts and questions in topics may be missed easily by the developer.

 

Safe flights

2 Likes

Thanks again. I’ll put some thoughts together as to search features on the development forum.  

1 Like