Tag articles, products, and anything else through a single reusable table using a polymorphic many-to-many relationship.
#Laravel
Articles
Stop stuffing regex into strings. Build reusable, testable validation rules with invokable Rule objects and closures.
Calling ->get() on a giant table loads every row into memory at once. Laravel gives you chunk, chunkById, cursor, and lazy to process big result sets safely.
Who changed this record, and when? Build a reusable audit trail using Eloquent observers so every create, update, and delete is logged automatically.
Laravel Cloud now deploys fully managed Symfony applications with no code changes, detecting the framework from composer.json and configuring the runtime for you.
Laracon US came back for its 2026 edition on July 28 and 29, at the SoWa Power Station in Boston's arts district. Two days, one stage, and a lineup of eighteen speakers that ranged from Taylor Otwell himself down to independent educators, package authors, and engineers visiting from outside the Laravel world entirely. If you couldn't make it to Boston, or you were there and want the announcements in one place without re-watching eight hours of stream, here's what actually happened on stage.
Calling env() in a controller works in development and returns null in production. Here is why config caching breaks it and the one rule that avoids the trap.
Storing money as a float invites rounding bugs. Build a custom Eloquent cast that keeps cents as integers in the database but exposes a clean value object.
Wrapping related writes in a transaction is easy to get subtly wrong. Laravel's DB::transaction() closure handles commit, rollback, and deadlock retries for you.
Facades look like static calls but are not. Understanding how Cache::get() reaches a real object in the container explains why facades stay testable.
Forge now provisions Valkey caches and object storage buckets directly from the dashboard, bringing two more pieces of app infrastructure under one roof.
Laravel's Stringable class turns nested PHP string functions into a readable left-to-right chain. Here are the methods worth committing to memory.
Take a Laravel app from hardcoded English strings to a properly localized interface with translation files, pluralization, and a middleware that sets the locale.
Stop wrapping query builder calls in if statements. The when() and unless() methods let you apply constraints conditionally while keeping the chain fluent.
Laravel's June 2026 updates added Bus::bulk(), which queues large batches of jobs with a single database insert per connection instead of one write per job.
Building a CSV export that holds an entire table in memory works until the table grows. Here is how to stream a download row by row so memory stays flat.
Eloquent will happily hide an N+1 query until it hits production. Strict model mode turns those silent mistakes into loud exceptions during development.
A handful of Artisan optimization commands shave real milliseconds off every request in production. Here is what each one does and when to run it.
Receive third-party webhooks safely in Laravel: verify signatures, skip CSRF correctly, guarantee idempotency, and process the payload on a queue.
Laravel's first-party AI SDK gives you one framework-native API for text, embeddings, tool-calling agents, and more across multiple providers.
Factory states, relationships, and sequences let you express exactly the test data a scenario needs in a single readable line.
Import a huge CSV without timing out by streaming it with LazyCollection and processing chunks through a Laravel job batch with progress tracking.
Named rate limiters and the RateLimiter facade let you throttle routes and any arbitrary action with per-user, per-plan, or dynamic limits.
Service providers are where Laravel is assembled. Understanding the difference between register() and boot() explains a whole class of subtle bugs.
Laravel Herd's July 2026 Windows update brings Forge organization support, a herd php:update all command, and a migration to the Forge v2 API.
Two small Laravel features, the tap() helper and higher-order collection messages, quietly remove a surprising amount of boilerplate from everyday code.
Wire up TOTP two-factor authentication in a Laravel app using Laravel Fortify, from installation through enabling, confirming, and challenging logins.
Cast Eloquent attributes to backed PHP enums to replace magic strings with real types, and give your enums behavior with helper methods.
A new @fonts Blade directive backed by a Vite font runtime lands in Laravel 13.x, handling preload tags, @font-face rules, and CSP nonces for you.
Build a shared-database multi-tenant Laravel app from scratch using a tenant column, middleware, and a global scope that keeps every query isolated.
Query scopes let you name and reuse common Eloquent constraints so your controllers stay readable and your query logic lives in one place.
Laravel's Pipeline class is the engine behind HTTP middleware, but it's a general-purpose pattern you can use anywhere you need to pass data through a chain of transformations.
Learn how to build a clean versioned REST API in Laravel using API Resources, route groups, and a versioned resource strategy that scales as your API evolves.
Subscriptionify is a new gateway-agnostic Laravel package that models subscription plans and feature quotas entirely in your own database.
Eight practical Laravel patterns that make your code read more like intent and less like implementation — from fluent helpers to conditional chains.
Laravel 13.17 ships first-class route metadata, a Postgres transaction pooler, the new dev:list command, and a ShouldNotRetry exception handler.
Caching is the fastest performance win in Laravel, but only if you do it right. These tips cover remember, cache stampedes, tagging, and atomic locks.
Laravel Notifications send the same message across mail, database, Slack, and SMS from one class. This tutorial builds a multi-channel notification system step by step.
Filament v5 arrived alongside Filament Blueprint, an AI tool. The headline is Livewire v4 support, and the upgrade is refreshingly painless. Here is what changed.
Route model binding does more than inject a model. Custom keys, scoped bindings, soft-delete handling, and enums all hide behind this everyday feature.
Replace a tangle of crontab entries with Laravel's expressive scheduler. This tutorial covers scheduling commands, closures, overlap prevention, and health checks.
What actually happens between a browser hitting your URL and Laravel returning a response? Understanding the request lifecycle makes you a far more capable developer.
Carbon ships with every Laravel app and handles dates beautifully once you know its tricks. Here are practical tips for comparisons, timezones, and testing time.
Build polished, responsive transactional emails in Laravel using Mailables and Markdown components, complete with attachments, queuing, and local previewing.
PHP 8.5 brings a real pipe operator, a proper URI extension, clone with property overrides, and the NoDiscard attribute. Here is what matters for Laravel developers.
Form Requests do more than validate. These tips cover authorization, data prep, after hooks, and returning clean validated data your controllers will love.
A step-by-step guide to handling file uploads in Laravel and storing them on Amazon S3, including validation, private files, and temporary signed URLs.
Blade components are more powerful than most developers realize. These tricks cover attribute bags, named slots, props, and conditional rendering you will use daily.
Laravel 13.16.0 lands with a built-in artisan dev command, a smarter queue worker, and a foreignUuidFor migration helper. Here is what changed and why it matters.
Most foreach loops in a Laravel app can be replaced with a single, more readable collection method. Here are seven that will clean up your code today.
Laravel's event system is one of its most powerful architectural tools. This lesson explains events, listeners, queued listeners, event subscribers, and observers, and when to reach for each.
Laravel Scout makes adding full-text search to your app surprisingly straightforward. This tutorial covers installation, indexing, searching, filtering, and deploying with Meilisearch.
Laravel Cloud just shipped Scale-to-Zero Flex compute, 20x faster cold starts, and a new four-tier pricing structure. Here is what changed and what it means for your hosting bill.
Pest PHP makes Laravel testing more expressive and less boilerplate-heavy. This tutorial walks through installation, expectations, datasets, higher-order tests, and architecture rules.
Laravel Sanctum handles both SPA cookie authentication and API token auth in one lightweight package. This tutorial covers both approaches, token abilities, expiration, and mobile auth.
The laravel/mcp package lets you expose your application as a structured MCP server so AI clients like Claude, Cursor, and GitHub Copilot can query your actual data instead of guessing at it.
Middleware in Laravel goes well beyond authentication guards. These five techniques cover terminable middleware, priority ordering, route-level parameters, and more.
Nuno Maduro just shipped Moat, a free Rust-powered CLI that scans your GitHub account, org, or repo and gives your security posture a hard look. Here is what it checks and why you should care.
Build polished, responsive transactional emails in Laravel using Mailables and Markdown components, complete with attachments, queuing, and local previewing.