Laravel & PHP notes, and small free tools for developers.
I'm Robert, a developer in the UK. This is where I write up the fixes and server setups I'd otherwise forget, and keep the little tools I reach for every day.
Latest posts
All posts →Return precise error validation messages using invokable rules in Laravel.
https://twitter.com/anwar_nairi/status/1581601346234507264
Making a database index invisible to test
Reference Deleting an unused index is still a risky operation: If you are wrong (and it is still ne...
Using closures into DB::transaction() to roll back
Reference Laravel tip - you can provide a closure into DB::transaction() and if any errors happen,...
Laravel how to handle similar custom Exception classes
Reference Laravel tip: if you want to create a few custom Exception classes that are similar, no ne...
Laravel - execute a relation model factory only when the relational id is not present
Reference In a factory you can execute a relation model factory only when the relational id...
A cheat sheet of the ways you can push jobs to queue in Laravel.
https://twitter.com/cosmeescobedo/status/1576978802952978433
Debugging long running queries using callback
Twitter Post How to sort these logs by their duration of execution if you'd like...