I Tried Working at 30,000ft

The rare occasion of me traveling alone came up and I was excited to have a few hours alone with my thoughts and make the most of the opportunity to get loads of work done....

July 5, 2023 · 8 min · Sam Anglin

MySQL Database Migration to a Remote Server from a .gz mysqldump file

Some bugs only appear when your web application is truly tested out in production. The actual use cases of your data structure may differ from what you imagined, so make a dump of the prod DB and play around on a development server....

July 1, 2023 · 12 min · Sam Anglin

Send SMTP Mail from Hetzner Server with Firewall

Laravel Mail Working locally but not on server. Getting stream_socket_client timeout error. We must allow outgoing TCP Connections in Hetzner Firewall....

June 30, 2023 · 3 min · Sam Anglin

How to test protected functions with PHPUnit in your Laravel app

An essential part of developing an app is testing your code. My preferred method of testing my Laravel code is using PHPUnit and this is how I use reflection to test those 'harder to reach' protected and private methods inside classes....

May 13, 2023 · 5 min · Sam Anglin

Undefined type 'Spatie\Permission\Models\' . 'Permission' | 'Role' | 'HasRoles'

VSCode with intelephense throws a strange and hard to debug error when using the spatie/laravel-permissions package even when you follow the docs to the letter. Here is how to fix it....

April 13, 2023 · 2 min · Sam Anglin