A collection of articles and snippets I've collected over the years.

How to install and start Mailhog on Ubuntu 20.04

January 14, 2022

Testing email on development sites can be hard but we can use Mailhog to make it easier. Here's how to install and start Mailhog on Ubuntu 20.04.

Sylius: How to add position to product images

January 5, 2022

Sylius doesn't come with functionality to change the ordering of images in the admin area but it would be great if we could do it ourselves. Here's how to add a position to the product images tab.

Vue Not Updating When Changing Array

July 11, 2021

Today I had a problem with Vue.js not updating when I changed content in an array. Here's how I resolved it

Feature Estimation: What is the real cost of adding a feature to a website?

January 2, 2021

When a client requests a feature, how do you provide a reasonable estimate? What do you base your estimate on. How much contingency do you add?

How To Create a New User in MySQL 8

November 27, 2020

The command to create a new user on MySQL version 8 has changed. Heres how to do it.

[Solved] Installing composer V1 with Ansible

November 12, 2020

Here's how I solved installing Composer V1 with Ansible

Magento 2: How to disable the Admin Two Factor Auth (2FA) Feature

September 17, 2020

Today I installed Magento 2 for the first time in about a year. Once installed I navigated to the admin area and was presented with a two factor auth warning. Heres how I disabled it.

Symfony: Open file in VSCode or PHPStorm from the browser

April 30, 2020

Did you know you can open files in your IDE direct from Symfony's exception pages?

How to Set a User Agent for PHP fopen() calls

January 21, 2020

How to set a user agent when using PHP's fopen() with an URL

How To Create A Multi-Page PDF From Images

January 14, 2020

Recently I needed to send someone a PDF of a bunch of scanned documents. Here's how I did it

Using Docker with Laravel

July 21, 2019

When developing on a Laravel project I've used Homebrew for my web server and database, or used a Vagrant box. Whilst these work well most of the time there's an alternative that is quickly becoming...

How to disable a payment method on the frontend with Magento 1

May 24, 2019

Its possible in Magento to place orders via the admin area. However, some payment methods require the customer to be present at time of purchase, and so the payment method won't show in the admin...

Laravel Gotcha: Unresolvable dependency

December 18, 2018

I got the following error when creating a new controller via Artisan: Unresolvable dependency resolving [Parameter #0 [ $repository ]] in class App\Http\Controllers\Controller

Apache: Use .htaccess to redirect non-www to www

August 25, 2018

Sometimes your website will be set up to serve your site on both and also Search engines will see this as two separate sites (unless you have a <code>rel="canonical"</code>...

Apache: Use .htaccess to redirect http to https

August 25, 2018

I'm forever having to lookup how to use Apache's .htaccess to redirect http to https so here it is.

Magento Admin Invalid Form Key

May 30, 2018

I Recently came across a situation where I couldn't log in to the Magento admin area, getting 'invalid form key on admin'. Here's how to fix it.