Blog

Data Transfer Objects In PHP 8

Data Transfer Objects In PHP 8

Data transfer objects (DTOs for short) are simple PHP classes which have one job: Store some data. Until recently the spatie/data-transfer-object package was our go-to when creating DTOs. This...

Read more

Keeping Up With Web Dev

Keeping Up With Web Dev

The internet moves fast. New libraries, new tools, major updates to existing tools, security vulnerabilites etc. To keep up with this we created a #learning channel in Slack. This serves two...

Read more

Asking for help

Asking for help

Sometime back in the summer just gone, I got a bit stuck. I’d been running this business for something like eight years, and somehow I’d lost track of where we were going. A lot of things that...

Read more

Testing With Laravel In Maintenance Mode

Testing With Laravel In Maintenance Mode

It is standard in our projects to include simple routes which are used to signify if the application is alive and working. They are primarily polled by Kubernetes liveness probes. The tests are...

Read more

Customising The fallbackPlaceholder In Laravel's Fallback Route

Customising The fallbackPlaceholder In Laravel's Fallback Route

There is a neat feature in Laravel called a Fallback Route. This is the route which will handle the request if none of the others can: Route::fallback(Controller::class); The fallback...

Read more

PhpStorm "No appropriate protocol" Database Error

PhpStorm "No appropriate protocol" Database Error

We recently started migrating from MySQL Workbench to use PhpStorm's internal database integration. In doing so we came across a rather cryptic error: The last packet successfully received from...

Read more

Image Compression For High DPR Images

Image Compression For High DPR Images

Images typically account for 40% of the size of a webpage. This makes them a key thing to look at when optimising a site. Image optimisation typically involves resizing and compressing it to be as...

Read more

Midday Mooch

Midday Mooch

A few weeks back I was booking a training course. The company we booked with, up the road from us in Wimborne, were doing something that caught my eye: the midday mile. They mentioned a range...

Read more

Storing Multi Currency Prices In Laravel

Storing Multi Currency Prices In Laravel

Recently I was involved with building a new module for our internal Intranet. It is responsible for storing all the details of our subscriptions; name, start/end dates, price, notes... All simple...

Read more

Image Focal Point Auto Detection

Image Focal Point Auto Detection

A recent trend with CMSes is to do focal point based media cropping. Traditionally an image is uploaded and then is cropped/scaled to the required size, eg a thumbnail. The problem is that crops...

Read more