Laravel Pro Tips
🔥 #Laravel Tip: Make use of ‘orderByRaw’ when you need to sort records in a more complex manner than simply A-Z or Z-A. Here’s an example where I sort ‘roles’ based on their level of importance (rather than their alphabetical order).
#Laravel Tip 🔥
You can use 'latest' and 'oldest' methods to order the results. By default the results will be sorted by created_at column.
If you want to sort the results based on a specific column, you can do so as well.
No articles were found.