I have a table in my Laravel view. When I sort it by date (from newest to oldest), it is ordering from July 1st downwards. Shouldn't it be from July 4th backwards? Also, when I sort it in reverse, it shows May in reverse and then June.
I tried sorting them from my controller, but it doesn't work. Similarly, I have made several changes in my view but nothing works.
What can I check to make it sort correctly?
If I sort in descending order, it should show July 4, 3, 2, 1; and in ascending order: May 31, June 1, etc.
Code in my view:
[The given PHP code is shown here.]
[The provided JavaScript code is shown here.]
In the provided JavaScript code, the functionalities for exporting PDFs, filtering data, and displaying alerts are included.
I tried sorting them from my controller, but it doesn't work. Similarly, I have made several changes in my view but nothing works.
What can I check to make it sort correctly?
If I sort in descending order, it should show July 4, 3, 2, 1; and in ascending order: May 31, June 1, etc.
Code in my view:
[The given PHP code is shown here.]
[The provided JavaScript code is shown here.]
In the provided JavaScript code, the functionalities for exporting PDFs, filtering data, and displaying alerts are included.