Eloquent, Postgres, UUIDs and not getting id's back

Postgres has an excellent column type for using UUIDs as primary keys. The UUIDs are generated default by Postgres. There is a small caveat working with UUIDs as primary keys...

Eloquent get() vs chunk() vs lazy() benchmarks

I did some unscientific benchmarks of the methods available in Laravel. Even the official documents describe the characteristics of each technique, I wanted a quick ”ballpark benchmark” of which one...

Select all checkboxes with Alpine.js

UPDATED 2021-12-03 Using the document.querySelectorAl to manipulate the DOM directly is not a good way to do this. Instead have array which contains all the availabe items. A...

Manually set path to PHP for Composer

Since macOS 15.0 Monteray, Apple is not shipping PHP as part of the OS. This can sometimes cause some problems for Composer when /usr/bin/php is no more. Also, the tighter...

Making a unsecure webcam stream secure without PHP

Here comes a small tip serving an insecure non-HTTPS video stream as HTTP. If you run an Nginx web server, you can use its proxy feature to pass on the...