BugMojoBugMojoBugMojo
FeaturesPricingBlogGuidesAbout
Log inGet started
BugMojoBugMojo

Bug reports that actually help fix bugs — capture, replay, share.

A product of Softech Infra.

Product

  • Features
  • Pricing
  • Get started
  • Log in

Resources

  • Blog
  • Guides
  • Compare
  • Glossary

Company

  • About
  • Contact
  • Privacy
  • Sitemap
  • Engineering
  • Playbooks
© 2026 BugMojo. All rights reserved.
AllGuidesEngineeringPlaybooksCompareGlossaryAlternativesBy roleBug tracking by framework
  1. Home
  2. Blog
  3. Bug tracking by framework
  4. Laravel 12
Bug tracking by framework

Bug tracking for Laravel — session replay, console + HAR (2026)

Laravel bug-reporting guide for QA + dev teams: framework-specific gotchas, common bugs, and how to capture them with BugMojo session replay.

5 min read·PHP
Isometric thin line-art browser rendering a Laravel form with a 419/422 HTTP request card peeling off toward an IDE node, lit by a single lime glow

What Laravel teams ship with BugMojo

Laravel reports a validation failure two completely different ways depending on how the request arrived. A traditional Blade or Inertia full-page POST gets a 302 redirect back with errors flashed to the session (the $errors MessageBag) plus the old() input; an XHR or JSON request to the same controller, hitting the same FormRequest, gets an HTTP 422 with a structured {message, errors{}} body that uses dot notation for nested fields like "users.0.email". Same code, two browser-visible outcomes, which is exactly why a screenshot is ambiguous and a captured network HAR is decisive.

The other Laravel bug that dominates support queues is the 419 Page Expired, a TokenMismatchException raised when a POST, PUT, PATCH, or DELETE arrives without a valid CSRF token. The @csrf Blade directive injects it into server-rendered forms, but an Inertia + Axios SPA must send it as the X-XSRF-TOKEN header read from the XSRF-TOKEN cookie, and a stale or mis-scoped SESSION_DOMAIN silently breaks the match. This guide is for Laravel teams shipping Blade, Livewire, and Inertia (React/Vue) in 2026: what these failures look like in the browser, and how to capture the exact request that caused them.

Laravel gotchas

Framework-specific failure modes engineers actually ship through. Each is hard to spot in a screenshot and obvious in a session replay.

422 vs 302: validation responds differently by request type

A web request (Blade/Inertia full page) redirects back 302 with errors flashed to the session and old() input. An XHR/JSON request returns 422 with a {message, errors{}} body. If your JS expected one and got the other, errors silently vanish. The network response status (302 vs 422) tells you which path actually ran.

419 Page Expired is a CSRF TokenMismatchException

A POST/PUT/PATCH/DELETE reached Laravel without a valid CSRF token. @csrf covers server-rendered forms; AJAX/SPA stacks must send the token as a header. Intermittent 419s usually mean the session cookie expired on an idle page, an HTML cache served a stale token, or SESSION_DOMAIN/SameSite is mis-scoped so the cookie never matched.

Inertia v2 has no built-in 419 handler

A TokenMismatchException is not a valid Inertia response, so the SPA surfaces it as a generic error modal instead of a usable message. The documented fix is server-side: catch 419 in bootstrap/app.php and return back()->with(['message' => 'The page expired, please try again.']) so the client gets a valid Inertia redirect with a flash prop. Invisible in a screenshot; obvious in a replay plus network log.

Inertia + Axios must attach X-XSRF-TOKEN from the cookie

Axios reads the XSRF-TOKEN cookie and sends it as the X-XSRF-TOKEN header automatically, but only if the cookie exists and is in scope. If withCredentials, the cookie domain, or SameSite is wrong, the header is absent and every mutating request 419s. Capture the failing request headers and you can see immediately whether the token was present, expired, or missing.

Livewire validation breaks if you drop wire:submit.prevent

Livewire v4 round-trips on wire:submit (and wire:model.live), $this->validate() throws a ValidationException Livewire catches, and the $errors bag re-renders into the DOM with no reload. Drop wire:submit.prevent and the browser does a native form POST, bypassing Livewire entirely and leaving stale errors in the DOM, a bug that only reproduces from the user's exact interaction sequence.

Common Laravel bugs

Real Laravel bug patterns — the symptom you will see in a report and the fix that actually works.

Validation errors never appear on an XHR-submitted form

Symptom: A fetch/Axios form submit fails silently with no inline errors and no toast. The user retypes and resubmits with no feedback at all.

Fix: An XHR request returns 422 with a JSON errors object; nothing renders automatically, so your JS must read response.data.errors and paint it. Confirm the response is 422 (not a 302 your client followed into HTML), then map the dot-notation keys to fields. The captured HAR shows the 422 body that your UI ignored.

jsonjson
// 422 body Laravel returns for an XHR request
{
  "message": "The given data was invalid.",
  "errors": {
    "email": ["The email field is required."],
    "address.zip": ["The address.zip must be 5 digits."]
  }
}

Every POST in an Inertia app returns 419 Page Expired

Symptom: Forms worked yesterday; today every submit shows a generic Inertia error modal. GET pages still load fine, so it looks framework-wide.

Fix: The XSRF-TOKEN cookie is missing or out of scope, so Axios never sends X-XSRF-TOKEN. Set SESSION_DOMAIN to your apex domain, confirm the cookie is present on the failing request, and handle 419 server-side so users get a real message instead of a modal.

phpphp
// bootstrap/app.php — turn a raw 419 into a usable Inertia redirect
->withExceptions(function (Exceptions $exceptions) {
    $exceptions->respond(function (Response $response) {
        if ($response->getStatusCode() === 419) {
            return back()->with([
                'message' => 'The page expired, please try again.',
            ]);
        }
        return $response;
    });
})

Livewire form does a full page reload and loses errors

Symptom: Submitting a Livewire form reloads the whole page and any previously shown validation errors disappear instead of updating in place.

Fix: The submit handler is missing wire:submit.prevent (or wire:submit), so the browser performs a native POST and bypasses Livewire. Add wire:submit to the form so $this->validate() runs server-side and the reactive $errors bag re-renders without a reload.

bladeblade
{{-- bug: native POST bypasses Livewire --}}
<form action="/save" method="POST">

{{-- fix: Livewire round-trip, reactive $errors --}}
<form wire:submit="save">

BugMojo vs alternatives

The honest comparison — where BugMojo wins, and where another tool might serve you better.

FeatureBugMojoTelescope / Sentry
DOM session replay of the user's exact stepsYes, rrweb-basedPartial: Sentry replay (sampled)
Network HAR with the 419/422 request + headersYes, shows X-XSRF-TOKEN present/missingPartial: server-side view only
Captures from Blade, Livewire & Inertia uniformlyYes, browser-layer, no SDKPartial: needs server instrumentation
MCP server: Claude Code / Cursor read the report in the IDEYes, bug is a first-class assigneeNo, neither Telescope nor Sentry has this
Always-on production error monitoring & aggregationNo, on-demand capture onlyYes, Sentry is more complete here
Local request/query/exception inspectionNoYes, Telescope in local dev
Console + network (HAR) capture✓Partial
Zero-setup Quick CaptureNo project, no SDKAccount / SDK required
The BugMojo column is highlighted. The closing rows are BugMojo’s core wedge: rrweb session replay, MCP for AI agents, console + network capture, and zero-setup Quick Capture.
Capture your next bug in 15 seconds

BugMojo records the DOM, console, and network — then ships a one-click ticket with the full replay attached. No SDK, no setup.

Try BugMojo free

Frequently asked questions

Frequently asked questions

Sources

  1. Laravel 12.x validation — 302 redirect with $errors/old() vs 422 JSON {message, errors{}} (dot notation) — Laravel (official docs, v12.x) (2025)
  2. Inertia.js v2 CSRF protection — XSRF-TOKEN cookie, X-XSRF-TOKEN header, 419 modal, bootstrap/app.php fix — Inertia.js (official docs) (2025)
  3. Laravel Livewire v4 validation — $this->validate(), reactive $errors bag, wire:submit, wire:model.live — Laravel Livewire (official docs, v4.x) (2026)
  4. 419 Page Expired Error in Laravel — How to fix it (@csrf, SESSION_DOMAIN, HTTPS/HTTP, cache, CSRF excludes) — SaaSykit (2024)
  5. State of PHP 2025 — Laravel 64% of 1,720 PHP-primary developers, WordPress 25%, Symfony 23% — JetBrains (PhpStorm blog) (2025-10)
Share:

More frameworks

Pick another — each guide has its own gotchas, comparison, and fixes.

React 19
JavaScript
Next.js 15
JavaScript
Vue 3.5
JavaScript
WordPress
PHP / CMS
Angular 19
TypeScript
SvelteKit 2 (Svelte 5)
JavaScript

On this page

  • What Laravel teams ship with BugMojo
  • Laravel gotchas
  • Common Laravel bugs
  • BugMojo vs alternatives