{ 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

PHP
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