Laravel Pro Tips
#validation #closure
#Laravel Validation Tip 🔥 You can use a closure instead of a rule object if you only need a custom rule once throughout your application. The closure receives the attribute's name, the attribute's value, and a `fail` callback that should be called if validation fails.
Gurmandeep Singh
#eloquent #closure
🌶️ #Laravel tip: When searching for the first record, you want to perform some actions, when you don't find it. `firstOrFail()` throws a 404 Exception. You can use `firstOr(function() {})` instead. Laravel got your covered ✅ #PHP #Developers
Bilal Haidar - Available 4 Laravel gigs
No articles were found.