Laravel Pro Tips
#request
π₯ Some of the helpful request methods in #Laravel. Which method do you use frequently?
Sanjit Singh
#eloquent #sorting
#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.
Gurmandeep Singh
#eloquent #models
Laravel / Eloquent tip π To select specific columns on a model you can use the select method -- or you can pass an array directly to the get method!
Daniel Eckermann
#cheatsheet #mail
π#Laravel Mail #cheatsheet π₯ #PHP
Aaron Lumsden π | Indie Hacker Dev
#validation #passwords
Laravel password validation rules areπ₯ There's even an 'uncompromised' that checks the password in the 'have i been pwned' database:
Martin Joo
#relationships #foreign key
#Laravel #Database Tip: While creating migrations you may also specify the desired action for the "on delete" and "on update" properties of the constraint. Here are more methods that #Laravel provides π #Laravel #Database #PHP https://t.co/pr3arpPGdk
Laravel Eloquent
#routes #controllers
#Laravel Tip β‘ Instead of using the controller in each route, consider using a route controller group.
#eloquent #models #cheatsheet
π₯ Laravel Tip: A cheatsheet of some things you can overwrite in your Eloquent models to fit your application better.
Cosme Escobedo
#validation
Checkboxes are a pain to validate against because if theyβre not checked theyβre not present in the HTTP request. You can solve this by using a hidden input, but #Laravel makes it easy to set up a default in the Request. Now `$request->opt_in` is always true or false. #PHP #Code
trovster