What should I test?
You might often hear developers say that you should write tests. Great, let’s go! But what should you test and where do you start? I don’t know all the answers,...
Creating multi-worksheet Excel files with Simple Excel
Recently I had to create a large data export for a project. I like using Spatie’s Simple Excel package to do this as it is very simple to use and...
The PHP foreach loop
An alternative to the for loop, the foreach loop is used to iterate or loop over an array. The foreach loop allows you to loop through the items in the...
The PHP for loop
If you have something you want to repeat then consider using a PHP for loop, saving you from copying and pasting the same code multiple times. Adding the code into...
Refactoring to Laravel 8 Class Model Factories
Laravel 8 introduced new class based model factories and if you have an existing project you can use the legacy factories package to keep using the old factories. I have...
The PHP array
Arrays are a useful toolt to store multiple values. You can access a specific value in an array using a key. By default, if you don’t specify keys, they will...