Laravel Pro Tips
#eloquent #models
#Laravel Tip 🔥 You can use 'inRandomOrder' method to sort the results of models randomly.
Gurmandeep Singh
#scheduler #tasks
🔥 Laravel Tip: You can specify what to do if a scheduled task fails or succeeds.
Cosme Escobedo
#models #hashes
Laravel Tip💡You can hide your auto-incremented database IDs from your users by hashing the ID using a library like HashId🕵️
Philo Hermans
#carbon #dates
Carbon provides next() and previous() functions that return upcoming and previous occurrences of a particular weekday or time.
Sanjit Singh
#policies
Laravel Tip 💡 Add a 'before()' method to your policy to validate a global condition before checking the actual policy permission. Useful when working with multiple guards and/or roles, for example.
#json
#Laravel #Eloquent Tip: Laravel v9.7 shapes with `whereJsonContainsKey()` method to allow you to check for array integer keys. See the below example. #Laravel #Database #PHP
Laravel Eloquent
#migrations
🔥 Laravel Tip: In your migrations, you can add multiple columns after another column using the after method.
#validation
💡 Quick #Laravel validation tip. If you want to make sure start and end dates in your forms are entered in the right order, the before_or_equal and after_or_equal rules got you covered. But what if you want either of the dates to be nullable? Rule::when() to the rescue! 🚀
Lupinity Labs | Freelance Software Dev
#validation #passwords
The more I discover more about Laravel, the more I love it... You can check if a password has been uncompromised ?? :o https://t.co/KQcqStpPJF
Noah Di Gesù 🤌