{ All snippets }

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

Annie 🦄⚡

Annie 🦄⚡ @anniebombanie_

🚀#CSS Tip Pseudo-elements can trip you up sometimes. Here's a lil something explaining their stack order. To change their natural order, assign these two properties: 1️⃣ z-index: __; 2️⃣ position: absolute; ⚠️ You MUST use a negative number to position it *under* its parent. https://t.co/YirNdyt8aZ


Laracasts @laracasts

Tip: Begin every test with a series of comments that describe your given/when/then. Then, one by one, convert those comments to actual code. Unless it's very basic, I begin *every* test in this way to gather my thoughts. https://t.co/67FtU9DmwH


🔥 If you're allowing a ?perPage= query param to be specified for your pagination results, LIMIT it! Particularly if you have a huge number of potential records. You can do this easily with the native min() PHP function. https://t.co/aNW7K09Zdt

Liam Hammett

Liam Hammett @LiamHammett

🔥 Sometimes, when using factories to seed random data, I might use a little random check to use an existing model for some relationships so not everything ends up creating new models for its own relations. It helps seeded data feel a lot more realistic to use. https://t.co/4GboYEfmcM

Tim MacDonald

Tim MacDonald @timacdonald87

🍭 You can utilise the Illuminate\Support Str + Arr classes in views without importing them No need to reach for a fully qualified name or the str_ / arr_ helpers They are defined as an alias in config/app.php which makes them available in the root namespace They just work™️ https://t.co/gUcutOebUL