{
  "id": 8018764,
  "title": "Snippets - Introducing Laravel Snippets",
  "url": "https://urgent.news/2026/09/17/snippets-introducing-laravel-snippets",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-17T12:00:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/capsulescodes/snippets-introducing-laravel-snippets-1le2"
  },
  "original_language": "en",
  "account": "Laravel Snippets is a new tool that brings the Laravel 13.x documentation to life by making every PHP code block runnable directly in your browser. No server is required for the code to execute, as PHP 8.5 runs inside a web worker and loads a Laravel 13 bundle. This demonstration showcases the potential of PHP.wasm snippets, rather than being an official Laravel resource.\n\nThe Laravel team deserves thanks for their outstanding work and comprehensive documentation. The documentation is enjoyable to read, but the code often sits still, requiring users to copy examples into a project, adapt them, and run them to see the results. Laravel Snippets bridges this gap by enabling users to run the code right where they read it, with immediate feedback.\n\nEach PHP fence in the documentation is transformed into a snippet with a \"Run\" button, and the output appears beneath the code. The Laravel 13 framework bundle is unzipped at boot, allowing popular classes like Illuminate\\Support\\Collection, dump(), and Lang::get() to resolve as they would in a project. The bundle also includes models such as User, Post, Flight, and Order, as the documentation frequently references them.\n\nLaravel Snippets stays current by syncing with the upstream laravel/docs markdown repository every day, fetching Laravel compiled CSS and fonts daily, and republishing the static site on GitHub Pages. A workflow reports on the success or failure of each snippet, categorizing them into six buckets: ran-ok, ran-with-stderr, ran-exit-nonzero, worker-error, no-output, and never-completed. While two-thirds of the examples run without issues, a third requires a warning, as those failures are not documentation bugs but rather designs where the code was never meant to run.",
  "summary": "Laravel Snippets is a static rendering of the Laravel 13.x documentation where every PHP code block is runnable. PHP 8.5 boots inside a web worker, loads a Laravel 13 bundle, and executes each example directly in your browser. No server runs any code. To try it right away, head over to this link . Laravel Snippets is a demonstration of what PHP.wasm snippets can do, not an official Laravel…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}