PHP missing extension ext-dom

When doing composer install you may get phpunit/phpunit 4.8.26 requires ext-dom * -> the requested PHP extension dom is missing from your system.. This is caused by the php-xml extension missing. On Ubuntu, you just need to do sudo apt-get install php-xml or, if you're using PHP 7 sudo apt-get install php7.0-xml.

Read More


Change Laravel mailer config on-the-fly

If you dependency inject Mailer into your class, it will have the original mailer config specified in your .env file. If you change the config like $this->config->set('services.sparkpost.secret', $mailConfig->key); $this->config->set('mail.driver', 'sparkpost');, the changes won't be applied.

Read More


Multiple databases in Lumen 5.2

It took me a couple of hours to figure out how to use multiple databases in Lumen 5.2, as much of the information about multiple databases was from when Lumen still had a config file.

Read More