#13 Takeout is pretty great, building a Linktree clone with Laravel, and more
Welcome to the 13th Andy's Web Dev Tips newsletter! Here's a few things from the last couple weeks:
Takeout by Tighten is a great addition to dev environments
Laracon Online 2020 is a wrap, and with it came some incredible announcements and updates from developers and teams in all corners of the Laravel community. Honestly though, the thing that really stood out to me most was the announcement of a tool called Takeout, built by Tighten (the same team behind Jigsaw and Ziggy).
Essentially, it’s a command-line tool that’s paired alongside Laravel Valet and helps spin-up small Docker containers for use in local development. I’ve talked at lengths about Docker for dev environments, and this tool is incredible for those just starting in the ecosystem, want to move away from the dreaded homebrew MySQL installation, or want a more streamlined experience that doesn’t directly deal with Docker files.
After installation, it’s as simple as running a command like takeout enable mysql.
A quick note though: Unfortunately right now, this tool is only available on MacOS.
Building a Linktree clone with Laravel
This week I published a new video, and this one is a good amount longer than any of my previous ones to date (running just under an hour). In this tutorial, I go over creating a basic clone of the Linktree app and dashboard using a brand new, out-of-the-box Laravel installation.
If you happen to check it out and like the format of building a site clone in Laravel from scratch, please let me know! If you have any suggestions for websites or apps you’d like to see in a future video, feel free to leave a comment on YouTube or send me a message on Twitter.
Accessibility testing is like making coffee
Over the course of the last few months, I’ve been exploring accessibility on the web more and more. Essentially what that boils down to, is designing, styling, and developing websites and application that don’t exclude users who might have impairments of vision, hearing, or anything that might use an alternative browsing method or who might access your site using non-conventional tools.
Making your site accessibility-friendly can be a bit of a daunting task at first. There’s easy-to-use tools like Lighthouse and Accessibility Insights for Web, but knowing when and why to use these tools (as well as understanding their outputs) can be difficult sometimes. This super helpful article I came across by Madalyn Parker outlines a few different methods for testing and modifying your site to be more accessible to all of your users. Each section is accompanied by a breakdown of tools and explanations that make it easy to follow and a great resource to come back to as needed.
Using group queued jobs in Laravel 8
A ton of new features to the Laravel framework were announced at Laracon, and version 8 is expected to be released in about a week from today. One of the more subtle, yet pretty dang useful, features that I saw was the ability to group queued jobs using the new Batch class.
Freek Van der Herten wrote a detailed blog post about how him and his team are planning to use the new feature to simplify and speed up their process of sending out emails through their app, Mailcoach. It essentially boils down to: instead of sending out jobs individually throughout the queue, you can group them up and send them out packaged together. The best part is that even if you have a massive amount of jobs, groups are kept in a LazyCollection and memory usage is managed.
Today I learned
This little helpful hint comes from Luís Dalmolin on Twitter. You can chain ->dd() to the end an Eloquent query and it will output both the raw SQL call used on the database, as well as the actual output from that call. Incredibly helpful when debugging complex queries or dealing with an unexpected data set getting returned.
That’s it for now! If you have any questions about the above, or have something you’d like me to check out, please feel free to let me know on Twitter.