Jump to content

Recommended Posts

Posted

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.

 

 

Posted

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

  • Like 1
Posted

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.

Posted

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

  • Like 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...