r/laravel • • 18h ago

Help Weekly /r/Laravel Help Thread

2 Upvotes

Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:

  • What steps have you taken so far?
  • What have you tried from the documentation?
  • Did you provide any error messages you are getting?
  • Are you able to provide instructions to replicate the issue?
  • Did you provide a code example?

    • Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.

For more immediate support, you can ask in the official Laravel Discord.

Thanks and welcome to the r/Laravel community!


r/laravel • • 2d ago

Shopper 3.0 RC: open source e-commerce engine for Laravel (Filament 5, Livewire 4, Store API + TypeScript SDK)

40 Upvotes

I maintain Shopper, an MIT e-commerce engine for Laravel. Version 3.0 is in release candidate and I'd like feedback before the stable release.

What 3.0 brings:

- A Store API and a typed TypeScript SDK. The same back office serves a Livewire storefront, a Next.js site or a mobile app.

- An upgrade from 2.x in one command: `php artisan shopper:upgrade` runs the migrations, renames the classes with Rector and converts the permissions.

- An admin panel on Filament 5 and Livewire 4, with passkeys, CSV product import and themes.

- A payment layer with signed webhooks, pending payments and idempotent refunds.

- Add-ons: price lists and customer groups (MIT), media hotspots (paid).

9 RCs have shipped since September. RC.9 came out this week and closes two security reports: paid files of virtual products are now delivered through temporary signed links, and two concurrent checkouts can no longer both reserve the last unit of a product on MySQL.

Laravel 12 and 13, PHP 8.3+.

composer require shopper/framework:^3.0.0-rc

Two things I'd like to hear:

- If you run Shopper 2 in production, run the upgrade on a copy of your store and tell me what breaks.

- If you looked at Shopper before and picked something else, what was missing?

GitHub: https://github.com/shopperlabs/shopper

RC.9 release notes: https://github.com/shopperlabs/shopper/releases/tag/v3.0.0-rc.9


r/laravel • • 3d ago

We released laravel-suspicious-login, an open source package to detect unusual logins

71 Upvotes

We've released a new package: spatie/laravel-suspicious-login 👀

It records login attempts and checks successful logins for things like a new device, a new country, or travel between locations that would be impossible in the time between logins.

You configure the checks in a preset, which is a PHP class that defines how many points each check adds and what happens at each risk level. You can notify the user, block the login, or run your own actions.

In true Spatie style, you can customize all behaviour.

✍️ Blogpost: https://freek.dev/3230-detecting-suspicious-logins-in-your-laravel-app

📚 Docs: https://spatie.be/docs/laravel-suspicious-login

⚙️ Source: https://github.com/spatie/laravel-suspicious-login


r/laravel • • 3d ago

Heptapod: a self-hosted, open-source monitoring alternative to Oh Dear

28 Upvotes

Hi everyone,

I built a monitoring app that replaces ohdear.app for my use-case. It's called Heptapod. The whole pitch is that it's self-hostable and open source. I love the guys at Spatie and have huge respect for them, but for my personal needs (lots of tiny sites), the pricing never made a lot of sense. I've been dogfooding it for a while now and while there are still a lot of rough edges, I'm no longer (too) embarrassed to show it to people. It covers most of the Oh Dear checks: uptime, performance, certificates, domain/DNS, broken links and mixed content, Lighthouse, cron heartbeats, application health and sitemap.

I realize that for larger clients ohdear.app is likely still the better solution, but if redundancy or multi-regional checks are none of your concern, you might still find value in a self-hosted alternative.

I would love to hear your feedback!


r/laravel • • 3d ago

This Week in PHP Internals | Nov 19, 2026

Thumbnail
youtu.be
1 Upvotes

While the Internals list is not technically directly Laravel related, it does affect every single one of us.

Preface: what follows is the word-for-word transcript of the spoken dialogue in the video, chapter by chapter with timestamps, for anyone who'd rather read than click through. If this digest is still too long for you, we recommend copying it into your LLM of choice and asking for a summary of our summary.

Cold Open (00:00)

PHP 8.6 is out today. Partial function application, a Duration class, a brand new polling API, and a lot more. And it shipped alongside security releases with 7 critical fixes. We'll get to both.

Hello world, it's Thursday, November 19, 2026, and here's what happened This Week in PHP Internals. 16 stories this week, so let's get into it. But first,

This week's episode is sponsored by… us, again. Since last week's call for work, we've taken a handful of calls, but nothing's locked in yet. So those 6 senior developer days a week are still open. If you've got a project in mind, book a call at artisan.build/start, or just send us a DM on any platform.

Corrections (00:54)

A correction to last week's social posts. On Mastodon, Threads and Pinkary, we wrote that Derick was okay with the shorter PECL timeline, and that Tim Düsterhus says the plan makes sense. But Tim's "makes sense" was about the first draft, before the timeline was cut. He hasn't commented on the shorter one yet, and he told us that he isn't 100% sure he likes it. The video had the order right. Thanks, Tim.

Links: Tim Düsterhus on the first-draft PECL timeline

PHP 8.6 (01:25)

This week's top story: PHP 8.6 is out today. Here are a few highlights. Partial function application lets you fill in some of a function's arguments now, with a question mark for the rest, and get back a closure that takes the rest later. A new Duration class represents elapsed time with nanosecond precision, so a timeout stops being a bare number of microseconds. The new polling API watches many streams at once, using epoll on Linux, kqueue on macOS, and the equivalent elsewhere, as a common base for event loops like ReactPHP and AMPHP. And there's clamp, which keeps a value inside a range, plus a SortDirection enum and default values for readonly properties. Sessions get safer defaults too: strict mode and HTTP-only cookies are on, and SameSite is set to Lax. The release page on php.net covers all of it. It calls 8.6 "Faster, Safer, More Powerful." Each headline feature has a side-by-side, before-and-after example, with a link to its RFC. So go read it. Link in the description.

Links: The PHP 8.6 release page

Security Release (02:42)

Also today, PHP shipped security releases for every supported version: 8.5.13, 8.4.28, 8.3.37 and 8.2.36, and PHP 8.6.0 ships with the same fixes. So, update. There are 17 advisories this time, and 7 of them are critical. The good news was in the pre-announcement: the critical ones "require either non-default configuration or uncommon setups", and each advisory spells out which setup. Three of them are in sessions. One is the upload-progress issue PHP warned about in October, where data gets written in one session format and read back in another. Its full advisory is out today, and the fix goes further than October's suggestion: upload progress is now off by default. If you switched it on yourself, it stays on, so anything that reads or writes those sessions needs to use the same serializer. Another critical one is in PHP-FPM, and it only matters if your web server keeps its connections to FPM open between requests. Standard nginx and Apache setups close them, and the advisory says those aren't affected.

Links: Release announcements · All of PHP's security advisories · The pre-announcement · October's upload progress advisory

The Wrong Crash (04:01)

One of today's critical bugs was found by Sebastian Bergmann, who created PHPUnit, and he's written up how he found it, in a post called "The wrong crash". After PHP2Shell, he boiled what those two bugs had in common down to a rule a program can check. He wrote: "once a request is over, nothing that outlives it may still point into its memory." While he was using that check to confirm one of the October bugs, it crashed somewhere it shouldn't have, and it crashed on the patched version too. So it had to be something new. The problem was in PHP's timezone cache. When PHP writes to its error log while it's starting up, it can cache timezone data for the timestamp, in memory that gets thrown away once startup ends. The pointer to that memory sticks around, and a fresh worker can follow it. The fix is a one-line change: outside a running request, those timestamps are now written in UTC. If you can't update right away, the advisory suggests fixing whatever PHP warns about at startup and restarting, or logging to syslog. The advisory credits Sebastian and Go Kudo. Sebastian sent the PHP team his method along with the bug, because, as he puts it, "Whoever finds one bug of a class owes such a project the means to find the others". His post goes much deeper than we can here, and it's linked below.

Links: Sebastian Bergmann, "The wrong crash" · The timezone cache advisory

Scope Globals (05:32)

The author of PHP's Scope RFC changed his mind, and then changed it back, in about 30 hours. Frode Børli's RFC gives each unit of work, like a request, its own scope. Last week, Larry Garfield called an empty new scope a landmine. On Friday, Frode agreed, and version 0.10 makes a new scope start as a copy of its creator's state. Then on Saturday, he changed his mind back. He wrote: "An object is a handle, not a value… a write inside the new scope reaches the creator. That is the leak a scope exists to prevent." The session can't be copied at all, he says, because it's a store with a lock. And he offered to withdraw the RFC if the list prefers the other direction. Larry replied that copying by hand shares objects in exactly the same way, and asked about coarser groups of state you could opt in or out of. Frode answered with his next version. The request arrays become "scope globals", and a new scope starts with them empty, the way a new process starts with empty globals. Then Larry suggested letting the thread rest until release week is over.

Links: Scope RFC · Frode Børli: version 0.10 · Frode Børli changes his mind back · Larry Garfield's reply · Frode Børli: scope globals

Channel Binding (06:48)

An RFC went from a vote date to withdrawn in a single day. Sjoerd Langkemper's openssl_get_channel_binding would hand userland the TLS channel-binding data that mail software like Roundcube needs for SCRAM-PLUS logins. On Tuesday, he announced a vote for this Friday. Jakub Zelenka, who looks after PHP's openssl extension, replied that one of its binding types doesn't work on TLS 1.3, and that the API was his biggest issue. He wrote: "My preference here is really to use a stream function (or potentially just meta data) and not introduce openssl function because it's inconsistent and hacky." That evening, Sjoerd withdrew the RFC, and said he won't pursue it further.

Links: openssl_get_channel_binding RFC · Sjoerd Langkemper announces the vote · Jakub Zelenka on the API · Withdrawn

Curl SSRF (07:38)

A new RFC wants curl to ask your code before it connects anywhere. Xavier Leune's proposal adds CURLOPT_OPENSOCKETFUNCTION, a callback that runs after DNS resolution and before each connection, and returns true or false. That, he says, is the point where an SSRF policy can be enforced reliably. Checking the URL up front, the RFC says, misses the many ways to spell one address, and DNS can answer differently the second time. He wrote: "It applies to the address actually about to be contacted, on every redirect hop and for every address libcurl tries, whatever spelling the URL used and whatever DNS answered." Nicolas Grekas suggested dropping the address-family parameter, since an IPv4 address wrapped in IPv6 would be reported as IPv6. Xavier took the suggestion two hours after posting, and a polyfill already covers PHP 8.3 to 8.6.

Links: CURLOPT_OPENSOCKETFUNCTION RFC · Xavier Leune opens the discussion · Nicolas Grekas on the address family · Implementation · Polyfill

Context Managers (08:43)

What happens when you return from inside a using block? Larry Garfield guessed, then checked with co-author Arnaud Le Blanc, and corrected himself. The generator is resumed first, so its cleanup runs, and then the function returns. The RFC now says that. Daniel Scherzer, one of the 8.6 release managers, sent six review points. An exception thrown after the yield seems to be silently ignored, yielded keys are dropped without an error, and he'd rather skip the special try using syntax, which he says "just saves 3 characters". There's no reply yet.

Links: Context Managers v2 RFC · Larry Garfield: "it will print A E C" · Daniel Scherzer's review

Revived RFCs (09:25)

Two RFCs are back after a summer off. Daniel Scherzer revived Friends, which lets a class name other classes that can reach its protected members, but not its private ones. It can't go to a vote before November 27th. Gina P. Banyard had a quick look at the implementation and saw no issues, but says she'll vote against it. Private properties plus reflection, she says, is a valid way for related components to get in. Alexander Egorov wants it inverted, so the class that needs access declares it, because "a class must know neither its clients nor possible inheritors." And Ben Ramsey restarted his Working Groups RFC, a policy for PHP project working groups, after 4 months. He wants to move to a vote, and his message starts a 14-day cooldown first.

Links: Friends RFC · Daniel Scherzer resumes the discussion · Gina P. Banyard · Alexander Egorov · Working Groups RFC · Ben Ramsey restarts it

String Matching (10:23)

The author of Str\Matcher says his own benchmarks oversold it. Artem Ukrainskiy wrote: "The old numbers ran one text over and over. The CPU learned it, and the new class looked 3-4 times faster than it is." Version 0.4 runs over a pool of different texts, with three real-data scenarios: comment moderation, bot detection by user agent, and linking PHP manual pages. With a reused object, he now reports 8 to 123 times faster than the fastest existing method, and says one call on a short text is slower. He says the main use case is worker servers like FrankenPHP, where the object is built once. He also dropped the count parameter Larry Garfield disliked, and added equality comparison.

Links: Prepared Literal String Matching RFC · Artem Ukrainskiy's v0.4 and new benchmarks

Quick Hits (11:19)

Quick hits. Weilin Du's RFC to make ini_get_all accept extension names in any case passed, 20 to 0, with 3 abstentions. It's already merged for PHP 8.7.

Links: Case-insensitive ini_get_all() RFC · Vote closed · Merged

Chris Abner Herrera Navarro's grapheme_str_pad vote is open, at 6 to 0 so far, and closes December 2nd.

Links: grapheme_str_pad() RFC · Vote opened

James Titcumb plans to open the vote on sunsetting PECL next Wednesday, November 25th.

Links: James Titcumb plans the vote

David Carlier proposed gethostaddresses, so the standard library can look up IPv6 addresses through the system resolver, and he plans a pull request.

Links: David Carlier's proposal · Issue

On PASSWORD_BCRYPT_WRAP, Mirco Babin pressed his objections again, and Rowan Tommins answered with numbers: a 54-byte pre-hash has 1.1 times 10 to the 130th possible values, against 2.5 times 10 to the 55th for bcrypt's own output.

Links: Rowan Tommins's numbers · PASSWORD_BCRYPT_WRAP RFC

Ignace Nyamagana Butera asked Máté Kocsis why query-parameter building options are set when the object is built, instead of when the string is.

Links: Ignace Nyamagana Butera's question · Query Parameter Manipulation discussion

And php.net's mail server moves data centres tomorrow, Friday, from 08:30 UTC, with about two hours of downtime.

Links: The announcement · Update

TL;DR (12:39)

So that's the week. PHP 8.6 is out, so go open the launch page, and today's security releases fix 7 critical issues, so update. Frode Børli wants new scopes to start empty after all, an openssl RFC was withdrawn the day its vote was announced, and curl may soon ask before it connects. Links below.

The PHP Foundation funds more than half of ongoing php-src commits, so if you use the language, maybe consider donating at opencollective.com/phpfoundation, or try guilting your employer into it.

If you found this useful, a like or a comment helps more people find it. And if you missed last week's episode, where PECL got a shutdown date that moved up two years in six days, that's a good one to watch next. And if you'd like to work with us, book a call at artisan.build/start. We're Artisan Build. See you next week.


r/laravel • • 4d ago

Fagus: HTML to PDF engine for Laravel without Chrome. Modern CSS, Tailwind, e-invoices, about 3 ms per page

84 Upvotes

Most Laravel apps I've seen make PDFs with Browsershot or Dompdf. Browsershot gives you real CSS, but you need Chrome and Node on every server, in every Docker image and in CI. Dompdf and mPDF install with Composer, but they don't know flex or grid, so templates end up as nested tables with inline styles. I wanted both at once, so I wrote my own engine.

Fagus is not a wrapper around a browser. It's a layout engine written in Rust that parses the HTML and CSS, lays out the pages itself and writes the PDF directly. The goal is that a document looks exactly like it does when Chrome prints it, and I test it against Chrome's output with the Web Platform Tests and a corpus of real documents.

Setup is just

composer require nforst/fagus

The package downloads the binary for your platform and checks it against a SHA-256 hash (Linux incl. Alpine, macOS, Windows). PHP starts it as a worker and keeps it running, so in a queue worker or under Octane every PDF after the first goes to an engine that's already warm.

You can render a Blade view

return Fagus::view('invoices.show', ['invoice' => $invoice])->name('invoice.pdf');

Fagus::view('invoices.show', $data)->pdfA('3b')->store("invoices/{$invoice->number}.pdf", 's3');

or plain HTML from anywhere, a string from the database, a template a customer wrote, whatever you have

$html = <<<'HTML'
<style>
  @page { size: A4; margin: 20mm; @bottom-right { content: "Page " counter(page) " of " counter(pages); } }
  .head { display: flex; justify-content: space-between; align-items: center; }
  .totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; }
</style>
<div class="head"><img src="logo.png" alt="ACME"><h1>Invoice 2026-0042</h1></div>
...
HTML;

$pdf = Fagus::html($html)->resource('logo.png', $logoBytes)->render();

The CSS part is what I care about most. You write CSS like for a web page, flex, grid, custom properties, calc(), web fonts, SVG, and you can check the layout in Chrome's print preview while you build the template, because Fagus is meant to give you the same result. Tailwind v4 works as well, including the print: variants. In Laravel you just hand it your compiled stylesheet

Fagus::view('invoices.show', $data)->stylesheet(Vite::content('resources/css/pdf.css'));

Headers, footers and page numbers come from @page in the CSS, not from separate header templates. Tables repeat their header on every page, rows can break cleanly, and a table of contents can show real page numbers with target-counter().

E-invoices were actually the reason I started this. With facturX() you pass the invoice XML your app already creates (or one from a library like horstoeko/zugferd), and Fagus writes a PDF/A-3 file with the XML embedded and the right metadata, so you get a valid ZUGFeRD / Factur-X invoice, also with the XRechnung profile. No extra tool afterwards. PDF/UA for tagged, accessible PDFs is built in too.

Fagus never loads anything from the network. Images, fonts and stylesheets are handed over by your code, either directly like the logo above or through a resolver callback the engine asks when it needs a file. So user supplied HTML can't make your server fetch URLs.

On speed, these are the times per PDF on my M2 Pro with the same invoice in every engine, once the process is running

  • 1 page, Fagus 3 ms, mPDF 24 ms, Dompdf 48 ms, Chrome kept running 74 ms
  • 10 pages, Fagus 17 ms, mPDF 230 ms, Dompdf 350 ms, Chrome 120 ms
  • 40 pages, Fagus 62 ms, mPDF 900 ms, Dompdf 2.7 s, Chrome 215 ms

It also needs far less memory, about 22 MB for a one page invoice where Chrome sits at around 250 MB, and it stays flat over thousands of renders, which matters for long running workers. Four workers in parallel did 224 PDFs per second, Chrome with four tabs 24.

It's 0.2.0 and Laravel 13 only, and there's no JavaScript. Some CSS isn't supported yet, but the playground tells you what it ignored if you paste your own template in: https://fagus.niklasforst.de/playground

Repo: https://github.com/nforst/fagus Docs: https://fagus.niklasforst.de/docs

If a template comes out different than in Chrome, I'd like to see the HTML.


r/laravel • • 3d ago

Laravel Herd $199 Lifetime Deal - Worth It?

Thumbnail
herd.laravel.com
0 Upvotes

Laravel Herd is being offered as a $199 lifetime deal for the first time. Yearly plans are on sale for $69/year.

What are the major reasons to purchase Herd Pro? Do any still exist in this AI era? Also I believe I saw an open source Herd Pro alternative.


r/laravel • • 5d ago

Introducing Fabric – an API reference UI built for Laravel, available in Scramble

Thumbnail
scramble.dedoc.co
33 Upvotes

Hey Laravel community!

Scramble is an OpenAPI documentation generator for Laravel that doesn't require manual PHPDoc annotations.

Since the beginning, I've received requests for guides alongside endpoint documentation, nested navigation, and more control over the API reference UI. Relying on existing renderers made some of these things difficult to build.

So I built Fabric, an API reference UI for Laravel, available in Scramble.

It supports:

  • Markdown guides, both at the top level and grouped with endpoints.
  • Nested endpoint navigation and sections.
  • Search across endpoints, guides, and schemas.
  • Request examples in Bash and Laravel, response examples, and generated TypeScript types.
  • Light and dark modes.

It also understands Laravel details like optional path parameters and nested query parameters, so the documentation and request examples reflect how your API actually works.

"Try it out" is something I'd love to build next. If you need it and would be happy to test early versions, let me know!

Give Fabric a try and let me know what you think!


r/laravel • • 6d ago

Working with clients who have their own Forge account? A 10-line fix for the Forge CLI's one-token limit

6 Upvotes

My sites live in my Forge account, one client's in theirs. After logging the Forge CLI into the client account, forge deploy for my own sites answered "The resource you are looking for could not be found."

The CLI keeps exactly one token (plus the selected organization and server) in ~/.laravel-forge/config.json. forge org:switch only helps inside one account, and inviting members into an organization needs the Business plan on the other side.

Since the whole CLI state is one JSON file, I keep one copy per account and swap it:

forge-use --save client    # save the current login as profile "client"
forge-use mine             # switch back later

Function (zsh/bash): https://gist.github.com/Sairahcaz/24e8f7a56f9e29b02bb40bcaa63b5ca5

I also opened a PR so the CLI stores one token per organization natively: https://github.com/laravel/forge-cli/pull/179

Two things I learned on the way:

  • forge login needs the user:view and organization:view scopes, without them it just says "Forbidden."
  • If the CLI came with Herd, it updates with Herd, not via composer global update.

Write-up incl. the token scopes I use and a one-line CLAUDE.md rule so Claude Code deploys with the right profile: https://laracraft.tech/en/blog/switching-laravel-forge-cli-between-multiple-accounts


r/laravel • • 5d ago

Relation Navigator: a page per relation manager in Filament 4 and 5, with a breadcrumb menu

Post image
1 Upvotes

In Filament, relation managers live in tabs on the record's page, at URLs like `/customers/1?relation=orders`. I wanted each of them to be a page of its own, with its own route (`/customers/1/orders`), title and breadcrumb, and a quick way to jump between them. So I built a plugin for it.

The page renders the relation manager you already have, so the table, filters, actions and policies stay the same. You add one trait to the resource and one to the view page, and there are no page classes to generate.

On top of that:

- the last breadcrumb opens a menu with the record's pages and relations, with search, a keyboard shortcut and badges that load when the menu opens

- previous and next record on the same page, following the list you came from

- an "Open as page" action on relation manager tables

- links to the relation pages in global search results

- optionally, `?relation=` links can redirect to the new pages

Each of these can be turned off globally, per resource or per relation. It is free and MIT licensed, supports Filament 4.13+ and 5, Laravel 12 and 13, and is translated into 32 languages, with the documentation in 10.

Package health: 100/100 on Plumb, the automated security, maintenance and ecosystem checks shown on the Filament plugin page.

Documentation: https://wit3.github.io/filament-relation-navigator/

Source: https://github.com/wit3/filament-relation-navigator

I'd like to hear how it fits your panels, and what's missing.


r/laravel • • 6d ago

Laravel API Starter

7 Upvotes

Not sure starter apps are even relevant anymore, but this is something I've been using for years in my freelance work. Just did a full rebuild with more modern tooling and workflow and decided to open source it. Pairs with a standalone Vue app/admin SPA and a flows repo.

Any feedback would be greatly appreciated.

https://github.com/websanova/starter-laravel-api


r/laravel • • 6d ago

Release SimpleStats 6.0 - now counts page views server-side: bounce rate and views per visitor next to your signups and revenue

15 Upvotes

Hi folks,

quick update on SimpleStats, the server-side analytics package for Laravel: version 6 of the client now counts page views. You get page views, views per visitor, bounce rate and a top pages list, and every breakdown (source, campaign, country, entry page) gets a Views column.

SimpleStats Page Views

What I find most useful is seeing engagement next to conversions. A channel can bring fewer visitors but people who read five pages each and sign up almost as often. Visitor counts alone hide that.

A few things that might be interesting for this sub:

  • No JS snippet. It's still all middleware, so ad blockers and declined cookie banners don't hide views.
  • Inertia, Livewire and Turbo page changes count, redirects, errors, JSON responses, prefetches and bots don't.
  • Pages behind auth (and Filament panels) are skipped on purpose. That's product usage, not website traffic.
  • It goes through your queue. A running queue:work or Horizon worker collects the views and sends them once a minute, so your requests don't wait for anything. On the sync queue page views stay off.
  • Coming from Fathom? There's now an importer: upload a Fathom pageviews export as it is, and visitors, page views, entry pages, referrers and UTMs match your Fathom dashboard per day. You can also import visitors and page views from your own CSV files.
  • php artisan simplestats:status tells you whether it's set up correctly, and works as a health check.

Page views are free and don't count against the event quota. The app is open source (AGPL-3.0) and can be self-hosted.

Blog post with the details: https://simplestats.io/blog/page-views-bounce-rate-laravel Repo: https://github.com/simplestats-io/app

Happy to answer questions, and I'd love to hear what you'd want to see next!


r/laravel • • 6d ago

FLEX Theme - Your Filament panel. Reimagined.

0 Upvotes

Customize your Filament panel's colors, fonts and layouts in a visual editor, and work faster with Global Search, keyboard controls and floating panels. Built on native Filament components and designed to match FLEX Fields.
Explore the features and docs:
https://flex-theme.bjanczak.com/docs


r/laravel • • 7d ago

Help Weekly /r/Laravel Help Thread

7 Upvotes

Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:

  • What steps have you taken so far?
  • What have you tried from the documentation?
  • Did you provide any error messages you are getting?
  • Are you able to provide instructions to replicate the issue?
  • Did you provide a code example?

    • Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.

For more immediate support, you can ask in the official Laravel Discord.

Thanks and welcome to the r/Laravel community!


r/laravel • • 7d ago

mnapoli/backoffice-mcp: Give AI agents access to your app's models for admin and support tasks

Thumbnail
github.com
2 Upvotes

r/laravel • • 9d ago

Weird decision by the laravel team..

Post image
205 Upvotes

r/laravel • • 10d ago

Aimeos Prisma 0.8: hundreds of fal.ai models plus Kling, Meta and Adobe Firefly in your Laravel app

Post image
3 Upvotes

Hi r/laravel,

we've released Aimeos Prisma 0.8. Prisma is a PHP package for using AI providers through one interface: text, structured output, embeddings, images, audio and video. It requires PHP 8.2+ and is MIT licensed. There's no service provider or config file to publish, you pass the config to using(), e.g. from config/services.php.

https://php-prisma.org

composer require aimeos/prisma:^0.8

If you already use Laravel's laravel/ai package, both work together. Keep agents and conversations in Laravel AI and expose Prisma's image, audio and video operations as AI tools.

Prisma started as a sister project of Prism. Prism is built for Laravel, Prisma has no framework dependency, so you can use the same code in Laravel, Symfony or plain PHP. Prisma also covers image, audio and video operations like inpainting, background removal, upscaling or video generation, and it supports more providers.

Six new providers

fal.ai has the most models: one API key gives you hundreds of them for text, images, audio and video, and model() picks the one you want. Add the key:

'fal' => [
    'api_key' => env('FAL_KEY'),
],
use Aimeos\Prisma\Prisma;
use Illuminate\Support\Facades\Storage;

$image = Prisma::image()
    ->using('fal', config('services.fal'))
    ->model('fal-ai/nano-banana-pro')
    ->imagine('A watercolor lighthouse at dusk', [], ['aspect_ratio' => '16:9']);

Storage::put('images/lighthouse.png', $image->binary());

For a few images this is fine in a request, for batches put it into a job.

Meta covers audio, image, text and video. Kling generates and edits videos. Adobe Firefly and Photoroom generate and edit images, and Hydracept does audio, images and video.

More features for existing providers

Recraft now covers generation, inpainting, erasing, background removal, uncrop and upscaling. Black Forest Labs and xAI can edit images by prompt, and Azure got an audio provider, text translation and image OCR. The new compose() and synthesize() methods generate music and sound effects with fal.ai and Hydracept.

Video jobs without blocking your workers

Generating a video takes minutes. Start it in the controller, pass the job ID to a queued job and let the job check back until the video is done:

$response = Prisma::video()
    ->using('kling', config('services.kling')) // or 'runway', 'veo', 'luma', 'fal', ...
    ->imagine('A lighthouse at dawn, waves crashing against the rocks');

FetchVideo::dispatch($response->jobId(), 'videos/lighthouse.mp4')->delay(30);
use Aimeos\Prisma\Prisma;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
use Illuminate\Support\Facades\Storage;

class FetchVideo implements ShouldQueue
{
    use Queueable;

    public function __construct(public string $jobId, public string $path)
    {
    }

    public function retryUntil(): DateTime
    {
        return now()->addHour();
    }

    public function handle(): void
    {
        $video = Prisma::video()
            ->using('kling', config('services.kling'))
            ->resume($this->jobId);

        if (!$video->ready()) {
            $this->release($video->retryAfter());
            return;
        }

        Storage::put($this->path, $video->binary());
    }
}

ready() checks the status once and retryAfter() says when to check again, so the worker is free for other jobs in between. Don't confuse it with the queue's retry_after setting. Laravel counts every release as an attempt, so retryUntil() sets a time limit instead of a number of tries.

Resume works for most async providers, and cancel() stops jobs on providers whose API supports it, like Runway or fal.ai.

Requests stay on public hosts

Prisma now checks every provider request, redirect and file download and refuses to connect to localhost or private networks. This keeps user-configurable endpoints from reaching services inside your network. For a local Ollama server, including one running as a Docker Compose service like http://ollama:11434, add withInternalHosts():

$response = Prisma::text()
    ->using('ollama', ['url' => 'http://ollama:11434'])
    ->withInternalHosts()
    ->write('Hello');

Before upgrading: local endpoints and requests through a proxy need withInternalHosts() now. Azure, Perplexity and Bedrock need configuration changes, and several default models changed. If you store embeddings, pin the model with model(), because vectors from a different model don't match your stored ones. PHP and Composer requirements are the same as in 0.7.

What are you building with image or video models in Laravel? I'm curious which providers people actually use in production.

If you like it, give it a star :-)


r/laravel • • 10d ago

This Week in PHP Internals | Nov 12, 2026

Thumbnail
youtu.be
0 Upvotes

While the Internals list is not technically directly Laravel related, it does affect every single one of us.

Preface: what follows is the word-for-word transcript of the spoken dialogue in the video, chapter by chapter with timestamps, for anyone who'd rather read than click through. If this digest is still too long for you, we recommend copying it into your LLM of choice and asking for a summary of our summary.

Cold Open (00:00)

PECL, the old home of PHP extensions, now has a proposed shutdown date. In the first draft, that date was the end of 2029. Six days later, after one misread word, it's the end of 2027. And the person who was misread is okay with it.

Hello world, it's Thursday, November 12, 2026, and here's what happened This Week in PHP Internals. 18 stories this week, so let's get into it. But first,

This week's episode is sponsored by… us! Artisan Build has some availability coming up. It wouldn't be me personally, all of my client time is already fully allocated, but we have 6 senior dev days per week available, starting basically right now, ongoing. Our rate is twelve hundred US dollars a day, and for longer engagements, that rate is negotiable. If that sounds like a fit, head to artisan.build/start.

Sunset PECL (01:01)

This week's top story: PECL, the extension repository that PIE is replacing, now has a proposed shutdown date. James Titcumb, who wrote the 2025 RFC that adopted PIE, opened the follow-up it called for. A banner goes up on January 4th, 2027. On June 30th, the site goes read-only, so nobody can log in or upload a release. Then come four brownouts, from 3 hours up to 3 days, and on December 31st, 2027, PECL shuts down.

Jakub Zelenka asked him to note that PIE also ships as a standalone binary, for older PHP versions, and Tim Düsterhus says the plan makes sense now that Docker's PHP 8.6 images drop PECL.

But the first draft ran to the end of 2029, with two and a half years read-only. Rowan Tommins pointed to the risk of freezing a package that turns out to be vulnerable. He wrote: "In the current environment, two and a half years seems a long time to serve something nobody can patch."

Derick Rethans suggested shortening it by a year. James cut it to one year overall, with vulnerable releases removed by hand if needed. Derick replied: "Although I didn't say 'to a year' but 'by a year', I am still okay with your suggestion." So PECL's end date moved up two whole years. There's no vote date yet.

Links: Sunset PECL RFC · James Titcumb opens the discussion · Rowan Tommins on serving packages nobody can patch · Derick Rethans · Derick Rethans, "by a year" · The timeline shortened to one year · James Titcumb's follow-up · The 2025 RFC that adopted PIE

Scope Defaults (02:37)

Larry Garfield says one default in the Scope RFC could keep him from supporting it. Frode Børli's RFC gives each unit of work, like a request, its own scope, and a new scope starts with empty superglobals.

In version 0.9.5, Frode kept that. A server creates the scopes, he says, and if a new one copied its creator's arrays, one the server missed would leak into the next request.

Côme Chilliet asked how more state could ever follow the scope later without breaking code. Larry's point is that anyone can create a scope, anywhere. He wrote: "This is a landmine large enough that it would keep me from supporting this RFC, which I otherwise quite like."

About an hour later, Frode replied. He wrote: "Thanks for pressing on this; I'd rather fix it in the RFC than find it in the vote." He plans to add a scope that starts as a copy of its creator's request arrays, locale and timezone, and asked which should be the default.

He also asked the list to choose between two plans: opting in to each piece of state with a bitmask, or designing it all in one RFC, alongside Kévin Dunglas's request hooks. Larry wants a shallow clone by default, and the full picture designed up front. He counts 21 pieces of state, which would mean 21 flags to opt into.

Links: Scope RFC · Larry Garfield: "a landmine" · Frode Børli's two plans · Frode Børli, follow-up

Context Managers (04:09)

Context managers are back, and this time they're a generator. Larry Garfield and Arnaud Le Blanc's first RFC never went to a vote, and the wiki now lists it as obsolete. Larry wrote: "It basically swaps the two-method approach in favor of 'it's a generator, you're welcome.'"

A using block runs the generator up to its yield, and the yielded value becomes the block's variable. When the block ends, even on an exception, the generator picks up after the yield, so the cleanup lives in one place. A second yield throws an error.

Most of the replies were about the arrow. Stephen Reay, Lazare Inepologlou and David Maye would rather use as, which they say fits PHP's existing syntax better. Larry says version 1 used as, until people took it to mean the left side gets used as the variable. He doesn't mind as himself. And Côme Chilliet asked why the block ends with a semicolon. Larry says using is an expression, like match. Arnaud's implementation is still a partial draft.

Links: Context Managers v2 RFC · Larry Garfield's announcement · Draft implementation

Request Hooks (05:24)

Kévin Dunglas's request hooks are now an RFC, targeting PHP 8.7. Florian Engelhardt asked whether it's intended that, in FrankenPHP, a worker's lifecycle starts with a request end and finishes with a request begin.

Kévin says it's intended. The first end cleans up the dummy request that boots the worker, and the last begin lets code after the loop still write output. Florian asked for that sequence in the RFC. He wrote: "Otherwise, I like that we could have an explicit hook to detect requests handled inside a worker!"

Version 0.2 spells it out. After a question on LinkedIn, a failing hook now tells the server to end the script, and session_start refuses to run between two requests.

Links: Request lifecycle hooks RFC · Kévin Dunglas opens the discussion · The lifecycle, explained · Version 0.2

Io Terminal (06:14)

Io\Terminal was due to go to a vote today. Pratik Bhujel postponed it after two reviews. Tim Düsterhus sent eight points, and said his main concern was the lack of examples, especially for how raw mode leases work.

Frode Børli, who maintains the phasync/tui terminal library, switched it to the pull request, and its tests behave the same. He wrote: "That part of the RFC works, and it is exactly what userland cannot do without spawning stty, using FFI, or Windows-specific tricks." But he asked to cut the RFC down to raw mode and terminal size. Libraries already decode keys, he says, and readKey has no modifiers.

Pratik shipped two revisions, with examples, NoDiscard on enableRawMode, and TerminalSize renamed to Dimensions. But he's keeping the read methods, for the many small scripts that just want "press a key" or "enter password". A new vote needs a fresh notice first.

Links: Io\Terminal RFC · Vote postponed · Frode Børli ports phasync/tui · Pull request

CSV Types (07:25)

PHP's proposed CSV extension now spells out what it will write. Ignace Nyamagana Butera asked for a supported types section, and Damian Jóźwiak found the implementation didn't match the RFC. It just cast fields to plain strings, like fputcsv, so an array became the word Array.

Version 1.3 writes a backed enum's value, writes false as zero instead of an empty field, and throws a TypeError for arrays, resources and pure enums.

Then Ignace pushed back on converting any object that has a string method. He wrote: "This is somewhat of an anti-pattern because it relies on a generic string representation of an object rather than an explicit serialization contract." Damian agreed. Version 1.4 throws on implicit __toString conversions too, and leaves a dedicated conversion interface for later. Frode Børli also suggested a small format object and separate encoder and decoder classes, and hasn't had a reply yet.

Links: CSV Extension RFC · Supported types · Damian Jóźwiak on the types · No implicit __toString() · Version 1.4

OPcache Dedup (08:35)

Run 80 WordPress sites from one PHP-FPM master, and OPcache stores a separate copy of the same code for each of them. A new proposal would let them share it.

OPcache keys scripts by path, so every copy of an app is cached on its own, even when its functions compile to the same opcodes. With a new opt-in setting, opcache.enable_dedup, a function whose opcodes match a block already in shared memory just points to that block. File names, errors and Reflection don't change, and it switches itself off when the JIT is available.

On a load test of 80 WordPress sites, its author reports, OPcache memory fell by 46.5%, with CPU per request within noise. After 11 days in production on 52 pools, it's down 43%, with zero worker crashes. Its author asks whether this needs an RFC, or just a pull request.

Links: The proposal (opcache.enable_dedup) · Case study · Patch

Exec Check (09:37)

Linux can now refuse to run files that aren't approved to execute, but a PHP file still runs. Alexander Mikhalitsyn wants to close that gap.

Since Linux 6.14, an interpreter can ask the kernel whether a file could be executed, and two security bits tell it to enforce the answer. He wrote: "Today a system can forbid running an unknown binary, but php /tmp/payload.php or an include of an uploaded file still works: the interpreter is the loophole."

His patch checks each file before compiling it, but only enforces the answer when those bits are set, so nothing changes by default, and an OPcache hit costs nothing. He ran phpBB under it. Generated code, like a framework's compiled container, has to be built at deploy time and marked executable. He's asking whether this needs an RFC.

Links: Pre-RFC: honour Linux AT_EXECVE_CHECK · Linux kernel docs

Quick Hits (10:38)

Quick hits. PHP 8.6.0 is due next Thursday, November 19th, after one extra release candidate. Matteo Beccati, one of the release managers, says the fix in October's security releases broke the ABI in 8.6 only, so extensions must be rebuilt.

Links: PHP 8.6.0RC6 · PHP 8.6.0RC5

Weilin Du's vote to let ini_get_all accept extension names in any case is at 18 to 0, with 3 abstentions. It closes November 16th.

Links: Case-insensitive extension names in ini_get_all() RFC

On 32-bit x86, 10 ** -2 doesn't equal 0.01. A contributor has four pull requests open to fix results like that, and asked whether PHP can require SSE2. Hans Henrik Bergan replied "Hell yes", since CPUs without it are nearly 30 years old.

Links: Floating point on 32-bit x86 · php-src PR 25362

Artem Ukrainskiy's Str\Matcher and Str\Replacer are now an RFC. Larry Garfield isn't opposed, but says it "feels very niche".

Links: Str\Matcher and Str\Replacer RFC · Larry Garfield's reply

Mirco Babin sent eight comments on PASSWORD_BCRYPT_WRAP, including OWASP's preference for Argon2, and Andrey Andreev replied that Argon2 isn't supported out of the box.

Links: Mirco Babin's comments · Andrey Andreev's reply

Otar Chekurishvili's JSON comments RFC now answers Jakub Zelenka's parser concern, and a new vote notice comes after the cooldown.

Links: JSON comments v1.1 · JSON comments RFC

A reviewer of Time\Instant still wants a cheap way to read the Unix timestamp.

Links: Time\Instant review

Tim agreed to Máté Kocsis's narrower value types for query parameters, to unblock the RFC.

Links: Tim Düsterhus on query parameters

Côme Chilliet said "Yes please!" to SSRF protection in curl, and Xavier Leune got karma to write the RFC.

Links: Côme Chilliet on curl SSRF protection · Xavier Leune's karma request

And a developer asked whether PHP's JIT would take a LoongArch64 backend, before writing thousands of lines of assembler.

Links: LoongArch64 JIT backend

TL;DR (12:38)

So that's the week. PECL has a proposed shutdown date, December 31st, 2027, two years sooner than the first draft. Larry called empty new scopes a landmine, and Frode plans to add one that copies its creator. Context managers came back as a generator, request hooks became an RFC, and the Io\Terminal vote is on hold. PHP 8.6 ships next week. Links below.

The PHP Foundation funds more than half of ongoing php-src commits, so if you use the language, maybe consider donating at opencollective.com/phpfoundation — or try guilting your employer into it.

If you found this useful, a like or a comment helps more people find it. And if you missed last week's episode, where FrankenPHP's creator wants PHP's engine to know when a request ends, that's a good one to watch next. And if you'd like to work with us, start at artisan.build/start. We're Artisan Build. See you next week.


r/laravel • • 13d ago

Bref now supports WebSockets/Laravel Broadcasting

Thumbnail
bref.sh
23 Upvotes

r/laravel • • 11d ago

Laravel Update | Taylor Otwell at Laracon EU 2026

Thumbnail
youtube.com
0 Upvotes

r/laravel • • 14d ago

Building Maintainable PHP Applications: Patterns and Principles

Thumbnail
codyssey.dev
60 Upvotes

Hey all,

I wrote a free course about a bunch of the most popular and most hated design patterns and principles with realistic examples in PHP (Laravel and Symfony).

There are a few of them that are missing but I’ll add them as a bonus at some point or maybe a separate course.

Let me know what you think.

Thanks.


r/laravel • • 13d ago

How does Laravel Herd let you use free models without them installed?

1 Upvotes

I was using the new Laravel Herd and my existing Claude code subscription to fix some bugs.

I was running something else that used up all my credits for a while.
I noticed I could switch off claude and use a bunch of free models. Ended up using Deep Seek.

I do not have any of them installed, nor do I use anything other than Claude.

How does that work?

I'm interested in giving that ability to my clients for another project, and I thought I had to integrate with the Claude SDK, but apparently you can let people just use free LLM models?

They looked like OpenCode models, but I do not have OpenCode on my computer.

Thanks!


r/laravel • • 13d ago

How are you using Laravel AI in your projects? Looking for ideas and real-world use cases

0 Upvotes

Hi Laravel community!

I'm interested in exploring how developers are using Laravel AI in their applications and projects.

I'd love to hear about your real-world experiences:

  • How are you integrating AI into your Laravel applications?
  • What kind of problems or tasks are you solving with AI?
  • Are you using it for chatbots, content generation, automation, data analysis, coding assistants, or something else?
  • Have you built any interesting projects or features using Laravel AI?
  • What challenges have you faced, and what has worked well for you?

I'm particularly interested in practical implementations, creative use cases, and success stories.

Looking forward to hearing what everyone is building!


r/laravel • • 14d ago

Help Weekly /r/Laravel Help Thread

3 Upvotes

Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:

  • What steps have you taken so far?
  • What have you tried from the documentation?
  • Did you provide any error messages you are getting?
  • Are you able to provide instructions to replicate the issue?
  • Did you provide a code example?

    • Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.

For more immediate support, you can ask in the official Laravel Discord.

Thanks and welcome to the r/Laravel community!