{ All snippets }

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

Umar Hansa

Umar Hansa @umaar

Little JavaScript snippet to see what all those .toThing() methods do on a Date object: Object.getOwnPropertyNames(Date.prototype) .filter(name => name.startsWith('to')) .map(method => `${method}: ${(new Date())[method]()}`) https://t.co/3H8XcZbgja

Taylor Otwell 🏝

Taylor Otwell 🏝 @taylorotwell

This is something I don't think we document well enough. If you prefer a "Models" directory... you can do things like php artisan make:policy PhotoPolicy --model=Models/Photo.... php artisan make:model Models/Photo... etc. All works fine! 🥰 https://t.co/ZykVwAbpgH

Steve Schoger

Steve Schoger @steveschoger

🔥 One small design detail that new designers often overlook is letter-spacing. Tricks like making headlines slightly condensed or giving small uppercase text a bit more space can go a long way towards giving a design that final level of polish. https://t.co/9Ed60pNf4p

Rias Van der Veken

Rias Van der Veken @Riasvdv

🔥 Don't want Laravel Mix complaining about the manifest during your CI tests and don't want to compile them to save time? Add this to your base TestCase https://t.co/Yuip8vL6cq

Jeffrey Way

Jeffrey Way @jeffrey_way

So happy to finally have arrow functions in PHP. Heads up that, if you use PHPStorm (2019.3), you can opt+enter to auto-switch between traditional closures and arrow functions.

Jeff Madsen

Jeff Madsen @codebyjeff

Today I learned: Vue (and prolly all js frameworks) can pass functions as props. Meaning, if you have a generic child component, you can *inject* things like validation rules. Just like a real language! I'll do a quick code blog explaining more later on. https://t.co/3SqaWXbG8f