{ All snippets }

Tweetsnippet is a curated list of tips and tricks from Twitter.

Chris⚡Arter 🤘

Chris⚡Arter 🤘 @ChrisArter

TIL about secret columns in a new version of MySQL 8. What are they? They are columns that do not show up in a SELECT * statement. They must be explicitly declared. (Thanks to @mmartin_joo 🥳) Here's an example in Laravel: https://t.co/NN4ftjN1O7

Dean Morgan

Dean Morgan @deanzod

Quick #laravel tip. Use whereIntegerInRaw() instead of whereIn() if you are querying against a large array of integers. One of my test queries went from 25 seconds to 200ms. #laraveltips

Andrew Schmelyun

Andrew Schmelyun @aschmelyun

Recently learned about fluent JSON testing in Laravel, basically being able to easily test an expected API's response down to the attributes + their values! https://t.co/eCnSRClWSb

Philo Hermans

Philo Hermans @Philo01

Laravel productivity tip! Add this little function to your bash profile to quickly execute anything with the Tinker command and get the results instantly. https://t.co/qIB9pQCTWt

Michael Dyrynda 💉💉

Michael Dyrynda 💉💉 @michaeldyrynda

🔥 An important consideration when working with @laravelphp's environment and config tooling that bit me. Keys that exist in your `.env` file with no value will not fallback to the `env()` helper's default value. To achieve the desired outcome, use null coalescing instead. https://t.co/qptuGEPzMN

Jonathan Reinink

Jonathan Reinink @reinink

🔥 Ever wondered how to set active states on links in an @inertiajs app? It's actually really easy to do! 💁‍♂️ Simply do string comparisons against the `page.url` or `page.component` properties. You can do exact matches, or "startsWith" checks, or even regular expressions! https://t.co/Gc3I917bVJ