Blog
September 12, 2022
How To Use Dataproviders When Testing Request Validators In Laravel
When writing request validators in Laravel, it is useful to know which incoming data will lead to a validation error, and which data will pass. A convenient way to test this, is to write unit...
ReadFebruary 18, 2022
How To Search And View The Data Of An Elasticsearch Index
When working with Elasticsearch, you might want to know what data is actually stored on an index. This article describes some endpoints of the Elasticsearch REST APIs that might help you during...
ReadNovember 10, 2021
Refactoring Multiple If Statements to Objects
In this article I would like to describe how you can refactor a method that contains multiple if-statements by creating objects with a single responsibility, each making their own assertions. Most...
ReadOctober 26, 2021
Database Transactions in Laravel with saveOrFail, updateOrFail, and deleteOrFail
When you want to rollback a set of database operations if one of them fails, you can execute them within a database transaction. Laravel provides several techniques to do this. One of them, that I...
Read