Recent Articles

#eloquent #relationships

The new findOr method in Laravel 9.x

A minor release for Laravel 9.x dropped a few days ago and among lots of new features and improvements, this release has introduced a new method called findOr in the Eloquent Builder and Relations.

Read full article []

#authentication #oauth

Implement a custom driver for Laravel Socialite

Laravel Socialite is an official Laravel package to authenticate with OAuth providers. It supports authentication with Facebook, Twitter, LinkedIn, Google, GitHub, and Bitbucket. But, what if you want to use a different driver?

Read full article []

#data integrity #concurrency

Handling Concurrency attacks in laravel

Many companies have suffered due to such attacks and in this post, we would see how Laravel solves this problem without a developer breaking a sweat!

Read full article []

#carbon #dates

Carbon PHP Practical Examples

I've been working and experimenting a lot lately with Carbon, the sublime PHP date and time utility library. I've tweeted a lot of Carbon tips and decided to collect all these tips into a permanent article.

Read full article []


Improve Passing Booleans in PHP

Passing booleans to a method can be code smell, as it is not clear what a boolean does by reading the calling code.

#validation #arrays

Validating arrays and nested values in Laravel

Validating arrays and nested values allows you to more effectively deal with data transmitted from your frontend.

Read full article []

#ecosystem #packages

The Laravel Ecosystem

Hopefully, if you're new to Laravel, this will give you a brief understanding of the first-party ecosystem so that you can decide when to use one package over another.

Read full article []

#testing #events #listeners

Structuring & testing your Laravel Events & Listeners

In this article, we explore one simple yet powerful and scalable approach to setting up and testing your events and listeners.

Read full article []