Blog


November 21, 2023

The Differences Between UpdateOrCreate And UpdateOrInsert in Laravel

When you want to update a record and create it when it doesn't exist, you can use the updateOrCreate or updateOrInsert method in Laravel. The so-called "upsert" methods....

Read

October 25, 2023

Mock Request Dependency in Laravel

In Laravel it is seen as good practice to dependency inject the Illuminuate\Http\Request object in your methods when possible, instead of using the request() helper. One of...

Read

October 24, 2023

Replace Multiple Items From String Text in PHP With Array

In this post I just want to show a very small trick I came across recently. You probably know the internal PHP function str_replace. When looking at the documentation, we can see...

Read

October 20, 2023

Using and Converting the WebP Image Format in your Laravel Project

WebP is a modern image format for the web that is developed by Google. It is based on the VP8 video format, and provides superior compression. Because of these qualities, it is intended to replace...

Read