{ All snippets }

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

Liam Hammett

Liam Hammett @LiamHammett

🔥 You don't need a closing tag when using the @​php directive in @laravelphp Blade, you can put some logic on a single line. It's especially nice to use it to do things like setting default values in a partial with the null-coalesce-assign operator. https://t.co/raQZBfPyxm

💡 in Laravel you can do things as the framework is terminating (after request has been processed!) You can do this in a middleware, using App::terminating with callback or natively with PHP using register_shutdown_function https://t.co/Z6tzN8jdkd

Jack McDade✨📺✨

Jack McDade✨📺✨ @jackmcdade

🔥 When working with position:absolute and want to move an element around in relation to the natural content flow… Use margin instead of `top/left/right/bottom`.

Liam Hammett

Liam Hammett @LiamHammett

🔥 With Laravel Mix, if you're building Sass files, you can pass a list of PostCSS plugins as the fourth parameter that will only apply to the given file. This is useful if you want one process to handle multiple things as usually the postCss method will apply to all CSS files https://t.co/B67M4kWOX4

Jason McCreary

Jason McCreary @gonedark

Piggybacking off the last 🔥 tip, most Blade templates simply use the `if` directive. However, there are so many more Blade directives available. These are not only more expressive, but often streamline the code. Here's a side-by-side comparison: https://t.co/Z2Edmf8kDO