{ All snippets }

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

Jason Beggs

Jason Beggs @jasonlbeggs

🔥 Reminder: When testing with Laravel, you can use the from() method to automatically set a referer url. This allows you to test redirects that use the redirect()->back() helper. https://t.co/1ny0hrAY2c

Jason McCreary

Jason McCreary @gonedark

⚗️ One of the most common integrations developers struggle to test is Guzzle. Fortunately, it has a `MockHandler` you can set up to return predefined responses. Since it uses the existing `Client` and `Response` objects, there's no need to change your implementation. https://t.co/Ui2Zyqj2Lt

Stefan Bauer

Stefan Bauer @stefanbauerme

🌟 I'm working on a little feature at the moment and I thought it might be worth sharing. Another tip when you need to work with time intervals and seconds. Using `CarbonInterval` makes it much more readable. https://t.co/ktpNR7BoKY

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