Renderless Components in Vue.js

At this year's Laracon Online Adam Wathan gave a fantastic talk on creating reusable view components. The excellent new post on Adam's blog is basically the written down version of talk. Amazing stuff!

Splitting a component into a presentational component and a renderless component is an extremely useful pattern to master and can make code reuse a lot easier, but it's not always worth it. Use this approach if:

  • You're building a library and you want to make it easy for users to customize how your component looks
  • You have multiple components in your project with very similar behavior but different layouts

https://adamwathan.me/renderless-components-in-vuejs/

Read more

Separate Interactive Test Suites

If you find yourself having a bunch of slow tests that don't need to execute every time you run the tests, take a look at PHPUnit's defaultTestSuite setting. TJ Miller explains it in a blog post he wrote last year.

To avoid running the interactive test suite with the rest of my tests, manually or via a CI job, I had to explicitly include all the other suites using phpunit --testsuite Api,Feature,Unit. This felt a bit grim and I would rather exclude just that one suite. So I did some digging and found the defaultTestSuite configuration for phpunit.

https://medium.com/@sixlive/separate-interactive-test-suites-f6fd59316ec2

Read more

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

laravel-medialibrary v7 has been released ? original

by Freek Van der Herten – 14 minute read

laravel-medialibrary is a powerful package that can help handle media in a Laravel application. It can organise your files across multiple filesystems, generate thumbnails, optimize images and much much more. At Spatie we use this package in nearly every project. The last few months our team has…

Read more

First Experiences with Symfony 4 & the Symfony Community

Getting to know another framework and community can be a daunting task. But in case of Symfony it proves not to be that hard. On his blog Matthew Setter shares his first steps into Symfony.

Recently, I decided to learn the basics of the Symfony (4) framework, so that I could better understand one of my client's applications, and provide better support to it. I never expected to use such a well-rounded framework. Nor did I expect to encounter such an engaged and supportive community. Here's the story.

https://www.matthewsetter.com/first-experience-with-symfony/

Read more

Laravel Excel — Lessons Learned

Last week Laravel Excel v3 was released. In a post on his company blog Patrick Brouwers writes the story of why and how v3 was released.

Laravel Excel (https://github.com/Maatwebsite/Laravel-Excel) turned 4 years last November and has reached almost 6 million Packagist downloads. A good time to reflect on 4,5 years of open source development.

https://medium.com/@maatwebsite/laravel-excel-lessons-learned-7fee2812551

Read more

Nothing is Something

Here's a video of a great talk by Sandi Metz she gave at RailConf 2015.

Our code is full of hidden assumptions, things that seem like nothing, secrets that we did not name and thus cannot see. These secrets represent missing concepts and this talk shows you how to expose those concepts with code that is easy to understand, change and extend. Being explicit about hidden ideas makes your code simpler, your apps clearer and your life better. Even very small ideas matter. Everything, even nothing, is something.

Read more

Server side rendering JavaScript from PHP

My colleague Seb did some amazing work with the creation of two packages that make it easy to get started with server side rendering in PHP. In a new post on his blog he'll tell you all about it.

Server side rendering is a hot topic when it comes to client side applications. Unfortunately, it's not an easy thing to do, especially if you're not building things in a Node.js environment.

I published two libraries to enable server side rendering JavaScript from PHP: spatie/server-side-rendering and spatie/laravel-server-side-rendering for Laravel apps.

Let's review some server side rendering concepts, benefits and tradeoffs, and build a server renderer in PHP from first principles.

https://sebastiandedeyne.com/posts/2018/server-side-rendering-javascript-from-php

Read more

Today we hit 10 million PHP package downloads original

by Freek Van der Herten – 2 minute read

For the past few years Spatie, the company where I work, has released many Laravel and PHP packages. Those packages are primarily built to be used in our own projects. We do not operate in a void. We have a community around us. They use our work. They help to make our packages better by submitting…

Read more

Responsive images done right

Our team is currently prepping a new version of our medialibrary. One of the highlights is support for responsive images. On his blog my colleague Brent explains what it entails and why it is important.

I want to share some thoughts on responsive images. I'll write about a certain mindset which many projects could benefit from: small- and mid-sized web projects that don't need a full blown CDN setup, but would enjoy the performance gain of responsive images.

https://www.stitcher.io/blog/responsive-images-done-right

Read more

10 Tips for Javascript Debugging Like a PRO with Console

console.log isn't the only command that can help you debug JS. Yotam Kadis, Editor of AppsFlyer, shares 10 more ways.

For the past decade, one of my passions is front-end development (especially javascript). As a craftsman, I love learning new tools of the trade. In this story, I’m going to give you some awesome tips for debugging like a pro, using the good old console.

https://medium.com/appsflyer/10-tips-for-javascript-debugging-like-a-pro-with-console-7140027eb5f6

Read more

7 Practical Tips for Cheating at Design

On their mutual Medium blog, Adam Wathan & Steve Schoger published an excellent post that offers 7 actionable tips to make your stuff look better.

It’s easy to throw your hands up and say, “I’ll never be able to make this look good, I’m not an artist!” but it turns out there are a ton of tricks you can use to level up your work that don’t require a background in graphic design. Here are seven simple ideas you can use to improve your designs today.

https://medium.com/refactoring-ui/7-practical-tips-for-cheating-at-design-40c736799886

Read more

Take the power back

iA writer is a great app to write text without any distractions (I'm not paid to say this ?). On their website the developers wrote an inspirational article that urges you to not only consume content, but also to create it.

You may have heard that the best way to deal with the “information overload” is to switch off your devices. To take a break from the Internet. Go for a run. Roll out the Yoga mat. Read a book. Talk to your friends. Switching off is good advice. But eventually, you’ll be back. How about changing? Changing from passive, to active. From scroll to search, from react to rethink, from like and retweet to write and link.

https://ia.net/topics/take-the-power-back/

Read more

Build a newsletter chatbot in PHP

On his blog Christoph Rumpel explains how you, using BotMan, can create a bot where users can subscribe to content updates.

Email has been a great channel for staying in touch with your audience for years. But times are changing and messengers are taking over communication. Let's see how I used Facebook Messenger to build a little newsletter bot for my upcoming book "Build Chatbots with PHP".

https://christoph-rumpel.com/2018/02/build-a-newsletter-chatbot-in-php-part-1

Pretty cool! I might add a bot to this very blog soon.

Read more