All entries of my technical and business blog

Validate Everything Including Pagination

May 26, 2026 laravel security

There are many reasons why we validate data - whether it’s a Laravel project or any other framework or technology. Sometimes it’s for user or business sanity, other times to keep the application functioning properly. We even do so for security - for both security attacks we know about and hopefully to stop ones we don’t understand.

This is the reason why I reached for validation on pagination requests. This is user input. Just because I don’t understand how it could hurt me doesn’t mean I should ignore it, right?

Let’s validate pagination - easily - in Laravel.

Use PHP Named Parameters for Readability

Apr 21, 2026 php

Having too many parameters for a method signature is a sign of a method that is doing too much. But, what can be done to make this more readable if you’re forced to stick with it? Let’s see an example using named parameters.

Laravel 201 Created JSON With Location Header

Mar 12, 2026 laravel

Each API seems to be different. However, there are some best practices that we should all try to follow.

One of those that I really like is the 201 Created HTTP response. If the object is created immediately, you may even return the full object contents.

In some cases, we don’t have the data or don’t want to return the full payload. We can return null with a location header. Here’s how to do that with Laravel.

Fixing PHPStorm when Git Stops Responding

Feb 26, 2026 git macos phpstorm

PHPStorm suddenly stopped recognizing my git repository. I cleared the cache, restarted the IDE, but nothing helped. I jumped to my terminal, ran git from the command line, and everything worked fine there. Confusing, right?

Let me explain why this happened and how I fixed it for good.

Why Im Not Writing About AI Yet

Feb 18, 2026 programming

AI is everywhere - and it has been for the last months… the last year(s)… I even use it now a lot as a tool for my development. So why haven’t I published AI guidance or written about it at all?

It’s really a simple reason. And it’s not what you think probably. I’m not a hater. It’s extreme love of AI and technology that makes me wait. Let me explain.

Customize Laravel Ide Helper to Autocomplete Blade Files

Dec 17, 2025 laravel phpstorm

I’m working with Yajra DataTables in a Laravel project and I’ve ran into a little bit of a headache. They provide their own render() method, which you pass a blade file to as the first parameter. Something like users.dogs.index - and through that mechanism it loads the proper blade for the datatable.

Here’s the problem, though. I can’t get auto complete and I can’t click through on that in PHPStorm. But I want to. Let’s find out how.

Phpstorm Terminal LC_ALL Error Fix

Dec 5, 2025 macos phpstorm scripting

When a new terminal opens in PHPStorm on macOS, I was getting a weird error: bash: warning: setlocale: LC_ALL: cannot change locale (en_US-u-hc-h12-u-ca-gregory-u-nu-latn): Invalid argument.. Strange, I use Oh My Zsh with the Zsh shell. Why am I getting that error? Why bash? I could ignore it each time - but I wanted a fix.

Github Workflow for Production Merge

Nov 18, 2025 git github

Github actions are awesome. In fact, we often write about them or share details on MasteringLaravel.io in the tips section or the community.

Let’s take a look at one particular workflow that appears pretty simple - after you understand it all.

How do we merge from develop into main for a production deploy or merge? By using this Github action.