Highly Performant PHP Sessions with Redis

March 29, 2021

The web is stateless, but often the apps we build are not. To facilitate state in web apps, PHP provides a session handling mechanism. Sessions are off by default, and enabled with the `session_start()` function. Read more about PHP session handling at https://www.php.net/manual/en/book.session.php If you have worked with PHP sessions before you may have noticed performance issues

Quick tip to access protected properties in PHP object

May 27, 2020

Calling an object that has a protected property that you need access to? This function will allow you to quickly access data stored in protected properties of PHP objects. Note: I tested this on PHP 7.4. It will likely work on other versions, but may need tweaking. Good developers will protect the internals of their

How to use custom pivot tables in Laravel 6.x

November 18, 2019

Have you run into this before? Your app’s database table structure is predefined and unalterable. There are lookup tables (called pivot table in Laravel) that create many to many relationships between tables using YOUR naming convention. It makes sense in the context of your application, but you quickly find out that Laravel’s relationship defaults do