How adding Type Declarations makes Your Code Dangerous

June 14, 2024
...and how to avoid it.

Type coverage is a way to gradually add type declarations to your PHP project—step by step, one by one. It's a PHPStan package that helps you maintain a specific minimal level from 0 % to 100 %.

Once we reach high coverage of 80-90 %, we feel safer. But our code can actually be in worse, even dangerous, shape.

The difference between Policies and FormRequest::authorize()

November 25, 2023
In Laravel, both policies and the FormRequest::authorize() method are used to control access to specific resources or actions within your application. However, they serve slightly different purposes and are typically used in different contexts.

Why Are Eloquent Timestamps Nullable?

November 25, 2023
Recently I was creating a new table and using the timestamps helper in the migration. I noticed something that seemed wrong, so I dug a little deeper and learned something new about Laravel and MySQL.

Introducing the Laravel Number Utility Class

November 20, 2023
In many applications, there's often a need to format numbers according to different requirements, such as displaying them as currency, percentages, or human-readable file sizes. Laravel didn't have a dedicated utility for this, so with the help of the community, I decided to create one. I've been working on this utility class for a a little while now, and am really excited that it was merged into the framework. Let's take a look at what it offers.

Laravel Pipelines

August 29, 2023
Pipeline is one of Laravel's less-known features. It's often used in the framework itself, for example routing, but not so many developers use it. In this article, I try to explain them, and show some examples.

A look at what's coming to Laravel 11

July 26, 2023
Laravel 11 is not scheduled to be released until the end of the year, but some new features have been shared out, and Taylor goes through some big new improvements in his Laracon keynote:

What's new in PHP 8.3

April 19, 2023
PHP 8.3 will be released on November 23, 2023; it has improvements to readonly classes, the new json_validate() function, additions to the recently added Randomizer class, stack overflow detection, and more.

Facilitating External Process Execution with Laravel's Process Facade: A Practical Guide

February 27, 2023
Laravel is one of the most popular PHP frameworks out there, and for good reason. It provides a powerful set of tools that make it easy to build complex web applications quickly and efficiently. One of the core concepts in Laravel is the idea of facades. Facades provide a simple way to access complex objects in a more intuitive and user-friendly way. In this article, we'll take a closer look at facades in Laravel and how they can be used to simplify your code.

Spatie Image Optimizer Health Check

January 29, 2023
Sometimes you figure out why the uploaded image is not progressive, while you use a media-library to handle the upload. This check will help you figure out if tools are installed on your server.

What's new in PHP 8.2?

November 8, 2022
PHP 8.2 is right around the corner — let's take a look at what's new! 

Eloquent MySQL views

August 20, 2022
MySQL views are a way of storing queries on the database level, and producing virtual tables with them. In this post we'll look at why you want to use them and how they can be integrated in Laravel with Eloquent models.

Laravel: New DB Commands

August 9, 2022
Following last week's release which focused on Artisan, this week's Laravel v9.24 release introduces three new database commands we think you will love.

New Laravel Doc Command

August 3, 2022
Released on v9.23. when running `php artisan doc collection` it will open the Laravel Collection documentation on your favorite browser.

12 Best Linux Distros For Programming in 2022

July 25, 2022
Linux is a Unix-like operating system that was originally created by Linus Torvalds. Linux is typically packaged in a Linux distribution. It is free and open source.

10 Settings to Simplify Work In PhpStorm in 2022

July 25, 2022
PhpStorm has a lot of great settings simplifying the developer’s work. But some very convenient settings are turned off by default. On the other hand, some rarely used ones are turned on by default. It could make work with the IDE slower than it could be.

Laravel: Refreshing Artisan

July 20, 2022
Today's Laravel v9.21.0 release introduces an amazing new look for Artisan. In fact, almost all of the built-in Artisan commands have been totally reimagined to deliver a better experience.

Introducing our new Laravel Options package

July 10, 2022
When developing web applications, you probably encounter a lot of places where someone needs to select one or more options in a select or multi-select. These select boxes always need a list of options with labels and values.

Handling Large Payload for Testing API

October 22, 2021
Generating test suite payload of large API can be mind-numbing if not implemented properly. Let us take a look on how to handle this in the best possible way.
loading data...