I write a lot of tutorials, in the aims that others can learn from my experience. It is also a great way to document how you approach common problems, so that you have a point of reference. Some of these are links through to Laravel News where they are articles that I have written there.

Modelling Busines Processes in Laravel

As developers, we often map business processes to digital processes, from sending an email to something quite complex. Let's look at how we can clean this up.

14 minute read

Passwordless Authentication in Laravel

Sometimes we don't want users to have passwords. Sometimes we want to send a magic link to a user's email address and have them click to gain access.

13 minute read

Laravel Response Classes

Responding from your Laravel application is vital, especially when you are building an API. Let's have a look at how we can power up our responses.

7 minute read

Laravel CI with GitHub Actions

GitHub Actions is a fantastic way to run your Continuous Integration workflows, from running your tests to checking static analysis and more.

7 minute read

Getting started with PHPInsights

PHPInsights is a composer package created by Nuno Maduro and is a fantastic tool to get started with analyzing the code quality of your PHP applications.

6 minute read

Laravel Pennant

Laravel Pennant is a package created by the Laravel team that provides Feature Flags for your applications..

4 minute read

Testing JSON:API Endpoints with PestPHP

JSON:API provides many options for filtering, sorting, and including extra data into the requested data using query parameters. Testing this can be frustrating.

4 minute read

Building APIs in Laravel

Building APIs in Laravel is an art form. You must think beyond data access and wrapping your Eloquent Models in API endpoints.

16 minute read

Reducing code duplication

Code duplication is the most painful thing for a lot of developers, you think you have solved the problem, but there are several instances of the same issue.

5 minute read

Configuring Laravel Pint

Laravel Pint is the hot new thing from the Laravel team. An excellent wrapper around PHP CS Fixer that is my go-to code standards tool.

6 minute read

Using OpenAI in Laravel

AI is it a buzzword, or is it something we should be thinking about? With the release of the OpenAI package, we can dive into AI-powered Laravel applications.

9 minute read

Effective Eloquent

Get ready to level up your Laravel skills with this tutorial on eloquent queries! You'll learn everything you need to know, from beginner to advanced techniques.

12 minute read

Eloquent API Calls

Time and again, I have spoken about API integrations, and each time I find an improvement from the last, once more into the fray.

10 minute read

Using DTOs to keep context

DTOs, or Data Transfer Objects, can be used for so much. Since PHP 8 was released, creating these fantastic classes in your projects has never been easier.

8 minute read

Creating a Password Generator

Password generation is something we all think about doing at some point, but how can we go about doing it and making these passwords easy to remember and secure.

12 minute read

Fun with Refactoring

Refactoring isn't a dirty word, quite the opposite. Refactoring is something that you do when you have leveled up or generally improved.

11 minute read

Your first Laravel 9 Application

If you have never built a Laravel application, let me take a walk-through with you from scratch - with no perceived knowledge. Follow along to learn Laravel.

59 minute read

Valid validators validating data

Validation is a must-have for any modern project, and in Laravel, it is super simple to get started. Let's talk about the different ways we can handle it.

11 minute read

Reaching for Facades

Facades, people seem to love them or hate them. Either way, they are a natural part of what Laravel is today. Laravel Facades aren't strictly facades, are they?

11 minute read

Diving into Notifications

In most applications, we need to send notifications, whether in-app, email or slack these are transactional notifications in your application. Let's take a dive.

13 minute read

Writing to the Database with Eloquent

Eloquent is one of the most powerful and amazing features in a modern framework today. From casting data to value objects, transactions, and relationships.

12 minute read

Simple one-time password authentication in Laravel

When dealing with Authentication in Laravel, there are several options out of the box. However, sometimes you need something more specific. This tutorial will look at how we can add a one-time password approach to our authentication flow.

26 minute read

Setting up your Data Model in Laravel

The data model is one of the most important parts of any Laravel application, many systems are designed around this data model so we approach it first.

8 minute read

Working with OS process in PHP

Sometimes you need to work with OS-level commands from your PHP application. Let's look at how we can do this and see if we can make the DX nicer.

7 minute read

Event Sourcing in Laravel

Event Sourcing is a term that has been getting more popular in the PHP community over the last few years, but it still remains a mystery to many developers.

23 minute read

JSON API Resources in Laravel

Consistent API responses are important these days, and finding a standard is a great way to level up your approach. In this tutorial, we will look at JSON API.

5 minute read

Running PHPStan on max with Laravel

As developers, the chance of you having a personal website is pretty high. After all, it is what we do - and most likely, you have rebuilt this countless times.

11 minute read

The State of Laravel Survey 2022

Laravel celebrated its 10th anniversary last year. Today it is the most popular PHP framework used by thousands of developers every day.

4 minute read

Eloquent Attribute Casting

Eloquent Castable attributes are one of the more powerful features of Laravel, some people use them religiously while others tend to shy away from them.

8 minute read

Laravel Pint

The long awaited hype train is finally over, Laravels latest open source CLI app has been released and we got our hands on it to tell you all about it.

4 minute read

Running PHPStan on max with Laravel

We have all needed to add some sort of search to our applications before, this tutorial will walk you through how you can use Laravel Scout and Meilisearch.

22 minute read

Running PHPStan on max with Laravel

Over the last few years static analysis in PHP, and more specifically Laravel, has become more and more popular. Follow this tutorial and start using it today

25 minute read

API Integrations using Saloon in Laravel

We have all been there, we want to integrate with a 3rd party API in Laravel and we ask ourselves 'How should I do this?', is Saloon the right choice for you?

24 minute read

Laravel subdomains in Docker

There are many ways you can add Docker to your Laravel application, but how do you add docker to your Laravel application when you need sub domain support?

20 minute read

Sauber PHP

I have used a lot of different frameworks in my career, from Zend(Laminas) to Yii, Cake to Codeignitor, SlimPHP to Laravel and more. They all have their own way of doing things, and their own selling points and benefits.

7 minute read

Building a CLI application in 2022

I have been building CLI apps for a long time, from simple bash/perl scripts back when I was a System Admin - and now using things like PHP Go or Rust. Let's walk through options for building CLI apps in 2022

7 minute read

Laravel Command Bus

In Laravel 5.1 the Command Bus was replaced with Dispatchable Jobs, we can still use them but let us also look at how to add a Command Bus.

11 minute read

Adapter Pattern

Over the years I have built a lot of SDKs to work with 3rd party APIs. Each time I require the same components, so I decided to create a way to bootstrap this process while still allowing flexibility

11 minute read

Testing API responses in pestPHP

I get asked about API response testing a lot, how should you do it, and where to start. I have a general rule when it comes to testing APIs, and that rule is: "test your code, and your code only". What do I mean by this? Let me explain.

9 minute read

Tappable Query Scopes in Laravel

I recently saw an awesome tweet while browsing twitter which introduced this idea of tappable query scopes, and wanted to share it and dig into it a little more.

3 minute read

Laravel DDD - Routing within our Domain

In a normal Laravel application we store all of our routes within web.php or api.php typically, however how does this work with our Domain Driven Design approach? Do we create a routes/{domain}.php file, or do we want to put this somewhere else?

4 minute read

Laravel DDD - Getting started with DDD in Laravel

In a typical Laravel application we are very used to doing things in a certain way, by the book as they say. However there comes a point in the applications lifetime that it is going to be easier to start looking to split this code into Domains so that we can logically group our code.

4 minute read

Laravel DDD - Querying Records in our Domain

In the last instalment we spoke about using a simplified version of the CQRS pattern to create commands. This time we are going to talk about the other side to this and talk about queries.

4 minute read

Laravel DDD - Using Data Objects; Domain Commands

In our last instalment we spoke about how we can use data objects and data object factories to escape what I call “array hell”, a place where we have no idea what is in something passed to a method and there is no context or strictness about them. Now that we know how we are going to create these let’s look at a way we can use them!

7 minute read

Adventures in PHP - PHP SDK Builder

Over the years I have built a lot of SDKs to work with 3rd party APIs. Each time I require the same components, so I decided to create a way to bootstrap this process while still allowing flexibility

9 minute read

Adventures in PHP - PHP URI Builder

In PHP you can easily build a URL by concatenating strings, and iterate that process nicely. However, I hate this approach. It doesn't feel true to OOP, and it definitely isn't testable

5 minute read

PHP Online - The Story So Far

I have been working on community projects now for the past 3-4 years, and in that time I have noticed something. PHP Online is my answer to what I think the community needs.

3 minute read

Building a REST API in GoLang - Part 1

I have been building APIs for production environments for many years now, predominently in PHP. The last 3 years however, I have been hard at work getting to grips with GoLang - so I thought I would change the pace and share a post on GoLang

14 minute read

My First Go Module - go api problem

Recently I have been playing with GoLang quite a lot, so I decided to try my hand at publishing my first Go Module to handle errors nicely in an API.

4 minute read

Embracing The Tall Stack with Event Sourcing, an adventure into the unknown

TALL stack is growing in popularity in the Laravel community, and rightly so. The way in which you can write beautiful code split into reactive components without ever having to leave PHP is a no brainer. Recently the TALL stack preset was released, which on its own is fantastic - but I wanted to take it one step further.

13 minute read

An adventure with Graph Databases

Recently I have been super interested in graph databases, most specifically neo4j. However, there was no official packages for PHP that were still active. I decided to change that.

3 minute read

Slim4 - A lightweight breath of fresh air

As a PHP developer I use Laravel quite heavily, but I have been a long time user of SlimPHP. The latest version of Slim has inspired me to use it more often.

3 minute read

Embracing PSRs to build an interoperable Http Client

Recently I have been scratching my head over PSR-18. As a new PSR there isn't a lot of information around it, but I saw that as a challenge. I decided to accept this challenge and build a compliant HTTP client to embrace the future of interoperability.

3 minute read

New Blog

New year new blog, concentrating on my personal blog.

1 minute read