Laravel Pro Tips
#artisan #reset tokens
π₯ #Laravel Tip: Save a little bit of database disk space by clearing out expired password reset tokens using the handy 'auth:clear-resets' Artisan command.
Matt Kingshott
#migrations #schema
π₯ #Laravel Tip: If your migrations folder is becoming bloated thanks to many files tweaking your database, consider dumping them into a raw SQL schema file. It is cleaner, and also makes running migrations much faster.
#routes #controllers #route groups
π‘Since #Laravel 8 you can group routes by Controller. It's very useful if you don't need every route for a resource just a few:
Martin Joo
#migrations #timestamps
πΆοΈ #Laravel tip: When using timestamp() columns in Laravel Migrations, append the useCurrent() & useCurrentOnUpdate() to set timestamp columns' default value to CURRENT_TIMESTAMP #PHP #Developers
Bilal Haidar - Available 4 Laravel gigs
#eloquent #models #eager loading
1οΈβ£ You can specify the relations to eager load on every query for that model using $with
Marian Pop πΊπ¦ Laravel Magazine
#eloquent #models #lazy loading #n+1
3οΈβ£ You can enable or disable lazy loading for a model using $preventsLazyLoading
#validation
π₯ #Laravel Tip: When a user updates their password, it is a good idea to invalidate all other sessions. As you would expect, Laravel makes this easy...
#slack #discord #notifications
π€π§ Want to log errors or user activity to Discord? You can use the Slack driver to send Slack compatible webhooks to Discord!
Lars Klopstra β¬
#arrays
Array destructuring is probably one of my favorite things in modern PHP and I don't think I use it enough
Andrew Schmelyun