#3 Console.table, multiple Laravel apps with Docker, and more

Welcome to the 3rd Andy's Web Dev Tips newsletter! Here's a few things from this week:

Use Console.table to debug arrays in JavaScript

I learned a super helpful new console method, and it’s already proving to be useful throughout the last couple of days. Using Console.table() displays an array, object, or array of objects, in a nicely-formatted table in your browser’s development console.

Instead of having to click through dropdown arrows, your data dumped is presented in an open, easy-to-read format that greatly improves your debugging capabilities.

Credit for the above goes to @telmo

Running multiple Laravel apps locally with Docker

You all asked for it, so here it is! In this short (13 minute) video, I go over setting up a docker-compose.yml file which allows your local environment to have two different Laravel apps running at the same time.

The beauty of this method means that you can be working on both a front-end application as well as something like a back-end microservice API, without having to fake data or constantly start/stop containers. I even show how to communicate between two Laravel apps through their Docker networks.

Laravel Debugbar has a new look

For those who are unaware, Laravel Debugbar is one of the best packages that you can install alongside your application to make development and optimization as smooth as possible. @barryvdh released a screenshot four days ago and announced that Version 3.3 will have the new design elements, matching the look and feel of the overall Laravel brand.

The connectionsToTransact property

Something quick and simple that came up on my Twitter feed. If you’re using the DatabaseMigrations or DatabaseTransactions trait in your Laravel tests, and are also using multiple different databases, there’s a simple way to ensure they’re all used. In your test class, add the databases as an array to the $connectionsToTransact property!

Credit for the above goes to @_joedixon

That’s it for this week! 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.