Reader Stacks

GUIDES

Laravel — Page 6

Laravel tutorials, Eloquent, artisan, auth, APIs, and deployment.

Compressing and Reducing Image Size on Upload in Laravel

Compression and resizing are two genuinely separate optimizations that Intervention Image happens to handle in the same fluent chain — applying both together is what typically produces the biggest file-size reduction.

Creating a Custom Artisan Command in Laravel

How to scaffold, argument/option-flag, and register a custom php artisan command — including the one config step people forget when it does not show up in the command list.

How to Run the Laravel Cron Job Scheduler

The one crontab entry that runs everything, why it must fire every minute, and how scheduled tasks are actually defined in Laravel 11 versus older versions.

Creating and Extracting ZIP Files in Laravel

PHP's ZipArchive extension does the actual work here — Laravel adds essentially no abstraction on top of it, which is genuinely fine, since the native API is already fairly simple for the common cases.

Building Infinite Scroll Pagination in Laravel

The scroll listener itself is the easy part — checking whether more pages actually exist, and preventing duplicate simultaneous requests, are what separates a working implementation from a buggy one.

Creating Custom Log Channels in Laravel

A dedicated log channel keeps one specific event stream (payments, webhooks) in its own file — genuinely easier to monitor and grep than digging it out of the shared laravel.log alongside everything else.

Compressing Images on Upload in Laravel

Reducing an uploaded image's file size without resizing it, using Intervention Image — and why compression quality and visual quality are not the same tradeoff for every image.

Generating Multiple Image Thumbnail Sizes in Laravel

Creating several resized versions of an uploaded image on the fly with Intervention Image — a small thumbnail, a medium preview, and the original — and why doing this at upload time beats resizing on every request.