Interruptible Jobs, Queue-wide Inspections, and Idempotency

Download MP3
Jake and Michael discuss all the latest Laravel releases, tutorials, and happenings in the community.

Hello everybody, welcome to episode 258

of the Laravel news podcast today is

Monday, May 11th, 2026. Mr. Dyrynda, I

was just looking at some of the YouTube

version of our podcast and if you dear

listener have not watched the YouTube

versions of our podcasts, like I have not

watched the versions of our podcasts on

YouTube, you should

definitely check them out.

Dude, you've been doing some solid work

on this. There's like chapter markers and

all the things. So if you only wanted to

hear about a particular piece, it's

really easy to jump around. And then also

there's like these title overlays. And

then the newest thing that you've added,

which is really cool, which is I think a

thing that people have been asking about

for some time is visualizations. So in

this last episode, you put maybe two or

three of them. They look really cool. So

one of the ones was like flaky test

retries. We were talking about that in past.

And so sometimes it's a big challenge to

talk about these things on air and try

and explain them without being able to

have an editor or any sort of

visualization in front of us. But this

does a really good job of visualizing

some of that. So that is really cool stuff. So what are you using to build those?

Yeah, so I mean, to contextualize it a

little bit, we've usually the only

comments we get on the podcast episodes

is that they would be better if there was

some visual aid, which I agree with it

makes sense. And it does. Yeah, it is. It

is kind of a tedious thing to go back and

do after the fact, especially if it's not

your forte. So there have been episodes

in the past where I've cracked open an

editor and I've like typed as as I've been watching the video back and forth.

And it's just when when we record these

episodes on Monday, and we release them

on Thursday, it's a compressed window,

especially because I'm not doing this

full time. It's kind of like an out of

hours thing. So over Christmas, I built

some tooling that will go and ingest the articles that we need to talk about it puts together our show notes. It basically prepares it acts as a producer for our episodes, you know, it gets everything ready, right? Right.

And then on the back of that, I then had

it go and generate chapter markers and

title markers for the videos and all of

this kind of stuff and then provide

summaries and and show notes and things

like that that we put on YouTube and into transistor but the one missing piece was still the visualizations and there was probably a couple of months ago, and I was like, I'm not sure what I'm doing.

So we willing in I think it's just like,

Oh, and I do it? project width I've now done a program work that edge JavaScript I've done a program I've done aD People

didn't Ramp Dist Van d

that they've published that you can use

in Claude. And so for last

episode I said to Claude,

here is our transcript. These are all of

our chapters. This is

what we've spoken about.

Go and find out of the transcript the

things that we talk about

that would be most interesting.

Reference the articles on Laravel news to

kind of figure out, you

know, what are the actual

code blocks and the examples that we're

talking about and then

create some visualizations. So

it's come up with a nice style that kind

of fits with the Laravel news

site and the podcast and all

that kind of stuff. And I've now codified

that as a skill. So in

theory, when I do this episode,

I can say here is our transcript, go and

generate and it will generate me some

basically transparent videos that we can

just overlay onto the

timeline when we're editing

and then exporting. So yeah, it's

something that I've wanted to do for a

long time, but it's just

been, you know, a tedious exercise and

something that I didn't

really have the skill to do all the

time to learn to do it well. And so it

was just, you know, we

didn't do it. But now, the kind of

content that we have, it's easy to kind

of generate that video with the tools

that are available now.

And so, you know, it's done a pretty good

job. So the whole

production process of the podcast,

I think the longest time now, the most

time consuming aspect of

putting these episodes out

is sitting down and recording them. Yeah,

yeah. As it should be. So

it's like, you have saved us

the job of a producer. So if, you know,

if we were having to

hire somebody to do that,

that would be an expensive thing. But you

have just figured out

how to do it. And this

remotion looks really pretty incredible.

Honestly, I'm gonna have to use this.

It's pretty cool stuff on there. So very

neat folks. Again, if you

have not checked it out,

you should definitely check it out on

YouTube under the Laravel news

channel. There we have it, Michael,

should we jump into it? Let's

jump into it. Laravel 13.7.0.

Let's talk about it. What's new? Jobs can

now react to worker

signals. So we're calling this

interruptible jobs. So Laravel 13.7

introduces this idea of interruptible

jobs. So this allows

the interface to respond. This

interruptible interface is

what you put on the job that you

want to be interruptible. This will

respond when a worker

receives a signal like SIG term.

This lets long running jobs clean up or

set a stop flag before the

worker exits. So now what

you get is you have a method that you put

on there called

interrupted. And when you get

interrupted, you will get that signal and

then you can do something for

the job to cleanly terminate

before the process shuts down. And so

really cool. I love that. That's a great

idea. There is a new,

this is a cool one. I actually have never

thought about this. But now

that you see it, you can't

unsee it sort of thing. A new fonts blade

directive and a VIT

fonts method for rendering

font preload links and in-load inline

styles. Of course we needed this. Of

course we had script,

we had styles. Now we have fonts. So the

feature reads font

manifests that are generated by the

VIT plugin and supports selective family

loading. So there's a basic

usage in your layout that looks

like at fonts. And that's it. You just

anything that's going to be

rendered by that VIT plugin

is going to get rendered into that at

fonts directive there.

And then you just load your

VIT resources, JS app.js underneath

there. This renders preload

link tags and inline style block

with all the font face rules and CSS

variables from that font manifest that

it's going to generate

for you. You can also just filter down to

a specific set of font

families that you're wanting

to load in. So you could say, Hey, this

is a, there's a bunch of

different font files that I

might need, but on this particular page

or on these particular

pages, I only need a single

font family. I want the sans family, or

you can load in multiples

by passing in an array with

the different sets of families that

you're interested in

loading in there. That is really

powerful. Very cool. And I feel like this

is one of those things I

have to look up every time I

have to do it. And so now I don't have

to, it's just at fonts.

Very, very cool. Bulk JSON path

assertions in test response. So the

testing layer now

includes this assert JSON paths,

and assert JSON missing paths method

methods for asserting

multiple JSON values. At once,

I feel like this is a trend we've been

seeing happening recently,

where things like does the

database contain and then not just a

single value, but I want to

check for all of these values,

and does it contain something that has

all of these, right? And

this assert JSON paths and

assert JSON missing paths. Now they allow

you to put in multiple

things rather than having to

chain on assert JSON path, assert JSON

path, assert JSON path, you

can just do it in one block,

one array there, and it will check to see

if all of those things

are present. And of course,

similarly, the assert JSON missing paths,

you can say I'm looking

for these keys to be absent,

and you just pass in an array there. And

Bob's your uncle, as they say in

Australia. Do they say

that in Australia? We sure do. Okay,

Bob's your uncle, there we go. Sort

direction, enum support

for collections. Another trend we've been

seeing here recently is that we are

getting enum support

all over the place, right, which is a

wonderful thing. And I am

here for it. So what you can now

do is in a collection, you say sort by,

you pass the value that

you're wanting to sort by, and then

you can say sort direction descending,

which is the sort direction

is the enum there. And so you

can use an enum to specify sort order

that will provide better type

safety when you're doing your

sorting. Introducing the worker

interrupted event. So this kind of is a

companion piece to go along

with that, that we talked about at the

top of this one, a new

worker interrupted event will be

dispatched when a worker receives a

signal before it stops. This is useful

for observability. So you

can log on those things, you can alert

it, you can call an external service when

that signal arrives,

even if that individual job doesn't

implement that interruptible, you have a

global event that you

can listen to. So you can do any of those

things as well. Alright, is

locked method has been added

to the lock class, if you've not looked

into the lock class, might

want to check that one out. The

is locked method is a new one that will

allow you to check the current lock

status. I know that I

feel like I've had to write lock logic in

my in my past, right, I've

had to do it myself. And so this

lock class is available for you. One of

those things you can look

at there. Lazy collection

key by now accepts guess what a back to

enum as we have seen in a

lot of other things. There's

of course other miscellaneous fixes and

improvements. Thankful to the team for

not only handling the

new features, but also making sure that

we stay nice and safe and

fixing anything that might be

broken across the stack there. That's

13.7. This sort direction,

you know, is this a PHP native

thing? I've never seen this before. I

don't know. Is it? Looks

looks like it. I mean, I don't see

anywhere else. Yeah. I mean, I can't find

the docs for it in PHP

either. But that doesn't,

it looks like there's, yeah, sort

direction is an enum

added to PHP eight dot six.

Um, there's a polyfill for it right dot

one as well. Yeah. So yeah,

meant to be used in userland

PHP and core PHP alike. Very cool. Looks

like it got merged into

the PHP dot six though.

Right. It's coming coming soon.

Indeed. Nice. Great. Love to see it.

userland enums at queue

wide inspection methods in

Laravel 13 dot eight. The existing queue

dot up reserve jobs,

delayed jobs and pending jobs

methods require a specific queue name,

which means checking multiple queues

requires chain calls.

This release Laravel 13 dot eight adds

all reserve jobs, all delay

jobs and all pending jobs to

retrieve jobs across every queue in a

single call. So as I said

previously, you would have to merge

the results of one onto the next onto the

next. Now you can just

say, give me all reserve jobs,

delayed jobs or pending jobs. Each method

returns a collection of

inspected job instances with UUID

name attempts and created at properties.

This is useful during

deployments when you need to confirm

no jobs are actively running before

stopping workers. The

methods work with the database

redis and fake queue drivers. Two new

events worker pausing

and worker resuming are now

dispatched when a queue worker receives

SIG user two or SIG

cont signals respectively.

These events give applications visibility

into worker state transitions,

useful for logging or alerting when

workers pause and resume

during deployments. These

SIG control signal changes that we've

seen in the last two releases

look a bit like there's some

observability work going on behind the

scenes within the

framework. Wonder if we'll see that

come to light as anything else in the

coming couple of months.

Wonder if it's a nightwatch thing. I

wonder if like there's interest in

nightwatch knowing when

those things are happening. And

I mean, I would want to know those things

actually would be

really handy to know that.

At the test response class now includes

assert session missing

input as the counterpart to the

existing assert session has input. It

accepts both or either a single field

name or an array of field

names. Following the sort direction

enough support added to collections in

13.7 query builder methods

like order by order by descending and

order by raw now also accept

the native PHP sort direction

inner, which is to be introduced in PHP

1.6 as we previously

discovered. The schedule list

artisan command now accepts a dash dash

environment option to filter schedule

tasks by the environment

they run it. This is helpful when running

schedule list on production

to see only the commands that

will actually execute in that environment

rather than seeing commands

restricted to local or staging

customer on delete and on update actions

for foreign keys. The

foreign key definition class

now accepts custom strings for on delete

and on update beyond the

standard cascade restrict

no action and set null. This resolves a

PHP stam conflict when

using postgres postgres partial

set null syntax for composite foreign

keys. Previously, the

middleware attribute on a

controller or method was ignored if the

route also had middleware

defined through other means

attribute provided middleware now merges

with the middleware from

other sources instead of being

discarded. SQSQ connections now support

named AWS credential

providers which allows using

specific credential profiles or chains

defined in the AWS SDK rather than only

environment variables

or instant instance metadata. And last

one here the malware

manager dot op set default driver

method now accepts backed enums in

addition to strings

matching the enough support already

available in mailer and driver methods.

This release in case you

couldn't tell from all of

the talking includes a large set of type

annotation and doc block

improvements from several

contributors covering schema builders

cache factory collections

and more additional fixes

include expired locks now excluded from

the database lock is

lock fixes for macros with

static closures model mount found

exception unit enough support and

infinite rate limited TTO on

custom increments and callable type

corrections for freeze time

and travel to you wanted to see

the official change log they keep a I

think I saw Joe T Joe Tannenbaum post

about the open source

change log that Laravel keeps now and is

kept up to date we'll have

links to the official change

log and all of the changes for you in the

show notes. Nice. Very cool.

We've got Laravel installer

speaking of Joe T Joe Tannenbaum. He has

made an update to the

Laravel installer that will return

JSON when it is running inside an AI

agent. So what actually is

interesting to me about this is

I was like, Okay, how are we detecting

that it's an AI agent? And if I come to

find out, there is a new

Laravel library called agent detector,

which is a lightweight PHP

utility to detect if your code

is running inside an AI agent or an

automated development environment. The

way that it does that

is it uses all these different detection

methods that are spelled out

in the read me file to detect

things like Gemini or codecs or AMP or

open code or Claude or co work or co

pilot. So it has all

the different ways that it is doing that

that is detecting if it in fact is

running inside of one

of those things completely separate from

this pull request did not

know this existed. But if

you're needing to do something similar in

your own project, and you're

using PHP dot two or above,

you can use this Laravel agent detector

as well. But what this will

do is it will detect if it's

running inside an agent, it will suppress

those interactive prompts,

so that your agent doesn't

have to deal with those. And instead, it

will decorate the output

with a single line of structured

JSON to standard out instead. And when I

say decorate, what I mean

is it wraps that method,

and then spits out JSON instead. And so

again, the changes come

from Joe Tannenbaum, that it

really it's covering the two things that

an agent actually

needs to know number one,

did it work? And if not, why did it not

work, right? So that's

what it's going to provide in

a JSON output. Success is true. Here's

the directory where it's

located. And here's the

name of the app, that's what you get back

in a JSON in the fact or in

the case that it was successful

on failure, will include an error

message, a path to the full installer log

and a tail of that logs,

which is enough context really for an

agent to understand what's

going on, what went wrong,

it can report back or give suggested

solutions for what you

know what you need to do next.

So pretty cool one for a genetic

workflows that the

agent runs the command,

raise the JSON result, and then the user

continues or handles the error. So there

you go. Pretty cool.

Excellent. On to the news headline item

here that Poliscope, the

agent first development

environment is now available for Windows

bringing the same app and

architecture as the macOS version

to Windows users. Poliscope is designed

for Laravel developers who want to work

with AI agents across

multiple workspaces, branches and

projects without constantly switching

context. With the Windows

release developers can now use Poliscope

on their operating system

of choice with Linux support.

Next in the pipeline. Poliscope will

detect if you have Laravel

Herd installed and will wire Herd

commands directly into your workspace.

One of the standout features

of Poliscope is support for

parallel branches. This lets you keep

multiple workspaces alive at

the same time, each with its

own test domain. For example, you can

work on a large billing feature at

feature-billing.test

while also reviewing a teammate's pull

request at

review-pr-482.test without switching branches,

stashing changes or disrupting your

current work. Now we've spoken about Git

work trees in the past.

Poliscope users copy on write on

supported file

systems, which is a much more

data file size, data consumption friendly

approach. So it will

basically link to the same

physical storage blocks on your disk and

will only track and

modify copy files that have

actually changed as part of that. More

technical than what I've

laid it out, but on supported

operating systems, it's basically a great

way to spin up multiple branches

simultaneously without,

you know, if you've got a gig worth of

node modules there, you're not copying a

gig every single time.

It will only basically seem like what

you're using and copy

what you've changed.

Yeah, so much more convenient. Yeah, for

sure. Poliscope creates a

checkpoint every time you send

a message to the agent and these

snapshots make it easy to review exactly

what changed and roll

back with a single click if needed. After

an agent completes a

task, you can expect the diff

continue working or revert the changes

before moving forward.

Poliscope also includes a process

runner that can boot your project stack

when a workspace opens.

You can define run scripts in

the poliscope.json configuration file and

enable auto start true to

automatically start services

like queue workers, the scheduler, npm

run dev and any other project specific

commands. This removes

the need for manually opening multiple

terminal tabs or remembering to start

background processes

while debugging. Poliscope's workspace UI

also works on mobile. You

can leave your development

machine running, check on an agent from

your phone, review diffs,

send follow up prompts or

revert changes through Poliscope's end to

end encrypted relay. And

as I mentioned at the top

of this section with Windows now

available, the Poliscope team say that

Linux support is coming

next. You can download Poliscope from the

official website. We'll have

links to all of that for you

in the show notes. Very good. Okay,

folks, if you have wanted to try Laravel

cloud, but you've been

concerned that maybe you're not sure if

your app is ready for

Laravel cloud. Meaning, is there

anything I need to change about my code

base that would be required before I

could jump in? Or maybe

you've already tried it once and like

something didn't work quite right. And

you're like, ah, man,

I just don't know exactly where to start

on that. This is one of the biggest

questions that developers

are asking before they migrate. Will my

app just work? And until

recently, the only way to do that

was to read the docs yourselves, audit

your dependencies by

hand, reach out to support,

those were sort of your methods. This is

changing because Laravel is

partnering with JMac, Jason

McCreary, Laravel's garbage man, the

author and creator of Laravel

shift. And what has launched

now is the Laravel cloud pre check. So

what this is, it's a free

static analysis shift that will

scan your repo and will give you a clear

couple things, right? Number one, a

compatibility report,

but then number two, not only something

is like, hey, you're good to

go, but also some suggestions,

if you're not like some warning items,

which would be minor items to review with

specific guidance on

what you might do to solve these

problems, or things that are going to let

you know, hey, there's

a blocker here, there's something that's

incompatible, you're going to need,

you're going to need to

address and again, actionable feedback on

what to fix. So there's a

quick three minute video here

between Eric Barnes and Jason talking

about, you know, what was

the sort of impetus of this

partnership, I think what it ended up

coming down to is Laravel's

like, we would like to have

something where we could tell people in

advance before they migrate

to cloud that they're going

to have some problems, how could we get

access to their repos and run

something that automatically

checks that and Jason's like, I got that,

like I've been doing that

for quite some time, right?

And I was looking at the stat and

realized this over 170,000 upgrades,

Laravel shift has handled,

so tons of domain knowledge baked into

these checks. What are the

things that it's checking?

Here we are, it's going to do some simple

checks like Laravel

framework version, do you have the

minimum version required? Do you have the

minimum PHP version required?

Do you have the PHP extensions

that are required? Then it's going to

look into things like how

about your Laravel octane

configuration? Is that going to be

working well with cloud? How about your

database configuration?

Because that might be a little bit

different too, right? Maybe you have

something that's not yet

supported in cloud. Well, you need to be

aware of that. So it's

going to look at read write

connections. How about calls to system

commands or hard coded system paths?

Those are things you're

also going to need to know about. And

they're going to get specific guidance on

how to mitigate those

in the case that you want to actually

move to cloud. So you can

try it for free, it's free,

you don't have to pay anything for it. If

you've been on the fence

about Laravel cloud, this is a

really easy way to find out where your

app actually stands and see

if cloud is something that's

relatively easy to get to for you. And

again, it's going to come

with specific guidance. If you've

never done a Laravel shift before, you're

in for treat because the

way that Jason does these pull

requests is very nice. It's not one big

pull request with a, you know, just a

list of things to do.

Every suggestion is its own comment. For

me, that's nice because I

can say, Hey, developer,

on my team, I want to know kind of where

you're at in the process.

And so as each discrete comment

has been handled, we just give a little

emoji reaction thumbs up

or you know, like a warning,

like stop symbol, like I need help on

this, I'm blocked on this,

I'm not sure exactly what to do.

So the pull requests themselves are

delightful. Jason always does a very

great, a very good job

on this. If you've been waiting to see if

you can get your app ready

for cloud, this is the way to

do it. Check it out. I'm going to talk

about this one, which is

Redberry, who is a Laravel partner

will host or has hosted by the time this

episode comes out,

George's first Laravel meetup in

Tbilisi. Laravel community continues to

expand globally. And now

it's reaching the south. Oh,

caucasus. It's reaching the south. Okay,

caucuses, caucuses, they go the South

caucuses on the 14th

of May, which is the same day that this

episode will come out. The

first official Laravel meetup

in Tbilisi, Georgia will take place

hosted by Laravel partner

Redberry. Our fearless leader,

Eric Barnes got together with Gaga

Dasalia, the co founder and CEO of

Redberry and Nika Georgia,

Georgia Liani, the agency's engineering

director about how the meetup came

together, why Laravel

has such strong adoption in Georgia and

what they hope to build

going forward. You can watch and

listen to the full interview on YouTube.

We have a list of that for

you on the show notes. But why

Georgia and why now? Redberry themselves

have been deeply involved in

the Laravel ecosystem for years

as an official partner agency with a team

of around 100 engineers

serving clients across

more than 15 countries. Despite that, a

local meetup has never quite

materialized until recently.

The turning point came after moving into

a new office in Radio

City, which finally gave them

the space to host community events. The

demand, however, had

already been there. According to

Nika, much of Georgia's Laravel adoption

dates back to or traces

back to timing. Many developers

in the region began their careers around

2015 and 2016, right as

Laravel was gaining momentum.

And that early adoption stuck. Laravel is

a framework that if you

start to develop on Laravel,

you're going to stay on Laravel. And that

long term stickiness has

helped to create a surprisingly

strong Laravel community in a relatively

small country. So whilst

this is the first official

meetup, the goal is to make it a

recurring event. And the team is

currently considering a cadence

somewhere between twice a year and

quarterly. Long term, there is a

possibility of growing

into a larger regional event with

neighboring countries in the South

Caucasus. The audience

could expand beyond Georgia itself. And

for now, the focus is on

consistency and creating a space

where local developers can connect and

share their work.

Unfortunately, by the time you hear this,

you will probably have missed this first

event. But that will be

listed on the official Laravel

community page, which you can find at

Laravel.com forward slash

community. And so keep an eye on

that if you live in or need to be Lisi

and work with Laravel and

want to attend a future meetup.

The meetup itself is a strong signal that

the local community is

growing and worth being part

of and shout out to Gaga and the Redberry

team for all that they're

doing. 150 people is no joke.

I mean, that's a lot of that's a lot of

work, a lot of effort and a lot of

interest for 150 people.

So good on them. That's that's wonderful.

Glad to hear it. Love to

see it. Okay, we're going to

shift down to packages. We've got 10

different packages to go

over here today. I'm going to

start with one called Laravel Sentinel,

sorry, Laravel schema,

sent to Sentinel. This is by

a Teshham at Broadway Web Services. And

what this is supposed to do

is it will detect when your

database is not up to date with your

migrations, right? So if

your database schema has drifted

away from what your migrations are, it's

going to help you identify

that. And then it's going to

generate a corrective migration to get

those things back into

sync. So when might this happen?

Well, we've all been there, like we're

troubleshooting the slow

query. And you're like,

Oh, we need an index on that thing. Let's

throw an index on there

quick. And so you throw an index

on there. Or I don't know, maybe you're

trying to generate some one

off report, you need to do some

stupid virtual column or something. And

so you check that in there,

whatever I, I would never do

that in production database that has

never actually happened. But if you

happen to be the type of

person who maybe accidentally did that

once, or even like, you

know, I've seen it happen where

like, oops, we shipped something that

should have actually been a Boolean

instead of a, you know,

integer or something like that, whatever,

you've changed the migrate,

or you just change it sort

of in production. It does happen, right?

In that case, this is going

to be really helpful, helpful.

So detecting drift happens with a artisan

command. I know the question you're

thinking in your head,

you're like, yes, but my local

environment environment is

not going to be out of date with

my migrations, because I just ran my

migrations on my local. So I don't know

if it's out of date with

production. Okay, we've got a solution

hang tight. PHP artisan schema drift is

going to check tables,

columns, data types, nullability,

defaults, indexes, foreign

keys, all those things I just

talked about that you might have added.

After the fact, it's going to run with a

strict flag to check

that the database is up to date with your

migrations. Okay, once

it detects that you're

going to run PHP artisan schema drift

fix, there's a couple

options fix and interactive.

Those will walk you through each detected

difference with a flag

that asks you, do you

want to do something about this? And if

you do, great. Now, here's

where we come to the magic,

cross environment comparison. So you can

point your diff command

at a different environments

database connection instead of your local

one, right? Because you

might have been thinking in

your head, well, I'll just go pull the

schema from the production

database, run it in locally,

you know, if I just get the schema, run

it in that I can do the

detection, you can do that,

and that works fine. But you can also

just say compare, e and v

equals staging, use this

database connection using my staging

database connection, and see

if there's anything that went

sideways there so that you can compare

those without actually

leaving your local development

environment. There is also a programmatic

API, the Sentinel facade

exposes that same diff as a DTO.

So you can use this in other places. One

of the places in which

it's used is this live wire

Sentinel database health component, where

you can have something that

will tell you, hey, these are

the things that are out of date, here are

the diffs, and stuff like

that. It only works locally,

that Sentinel database health. But there

you have that is a

support, it's supported between

Laravel 13 and Laravel 11 all the way

back to Laravel 11. So you

can check that out on GitHub

Laravel sent Laravel schema Sentinel.

Wendell Adriel released

Laravel item potency, a package

that has HTTP item potency to write

oriented Laravel routes. When

a post, put or patch request

is retried with the same idepotency key

and the same payload, the

package replays the original

cache response instead of running the

route handler again, a

common requirement for payment

endpoints order creation and any API

where clients may retry on a network

failure. The package

provides two ways to attach item potency

to a route. The first is a

standard route middleware,

the middleware expects an idepotency key

header. And when the same key is sent

again with identical

request data, the original response is

returned with an idepotency

replied true header added to

the response. Per route configuration is

available via the idepotence

dotop using method. The second

option is a PHP attribute which works at

the class or method level

and accepts the same options.

Since the attribute extends Laravel's

built in controller

middleware attribute only and accept

work as expected. Idepotency keys can be

scoped in three different

ways configured globally in

the config idepotency dot PHP file or

overwritten per route. Keys can be

segmented by authenticated

user, guest requests will fall back to

client IP. So this is the user scope,

there is the IP scope

where keys are segmented by client IP

address and the global scope where the

same key applies across

all users and IP addresses. The package

handles two conflict scenarios. If a

request arrives with

the same key but a different payload, it

returns a 422 so a

validation error. And if a second

matching request arrives while the first

is still being processed a

true inflight duplicate, it

returns a 409 conflict header with a

retry after one header in the

response. Both behaviors work

through Laravel's cache atomic locks so a

cache driver with lock

support like Redis or memcache

is required. And two artisan commands let

you inspect and clear

cached entries without touching

the cache directly. So the idepotency

list renders a table of

active entries with scope,

identifier, key, route, status code and

expiry and the idepotency

forget removes entries by scope,

identifier or key. Destructive calls

prompt for confirmation unless

the force flag is passed. You

can find the package on GitHub. We'll

have links to all of that

for you in the show notes.

Very good. Okay. Have you ever used

Laravel notifications, Mr. Durrinda?

Yes, almost. They are. They are a pretty

amazing piece of infrastructure.

Infrastructure? No. And

they're nice abstraction as I guess if I

get to right. We've all had these

situations where you

have a single notification that you want

to send and you want to send it via one

or multiple channels

and you have to wire up the integration

yourself. Wouldn't it be

nice if you could just write a

notification and then you could say these

are the types of channels I

want to send it to and there

was drivers already written for that.

That's exactly what Laravel

notifications are. And then

there is this Laravel notifications

channel project, which is a

community collection of these

different notification drivers for

Laravel. There's tons of them on there,

right? You can think of all

the main ones. There's Slack, there's

Telegram, there's X, there

is whatever, list them off.

There's a bunch of them, right? But this

is a new one. It is web push

notifications. And so this

uses underneath the browser's push API

and vapid, V-A-P-I-D keys.

I was trying to in the short

period of time I had between my last

little segment and the

second that you had, trying to

understand what these are. The

interesting part about this is a lot of

times it requires like

this like service worker sort of stuff in

the past when I've done this.

But I think this vapid keys,

it doesn't actually require that there's

something about being able

to do like server to server

communication with no third party push

service in between. So

Chrome, Firefox, Edge, as far as all

are all supported. I need to do a little

bit more reading about this, but it seems

very interesting. So you pull in the

package via composer, you

add the has push subscriptions

trait to your user model. That is what

gives users their push subscription

methods. And then the

package itself needs a database table to

store subscriptions and

publish and run its migrations.

So you're going to do that, you will

generate a vapid key pair.

So you have a public key and a

private key. And this gets shared with

the browser when a user

subscribes the private key

will sign those outgoing push messages.

The browsers can verify that

it did in fact come from you.

You of course treat these like you would

with any other secret,

don't rotate them every existing

subscription that you have is tied to

that key pair that created

it. So if you switch those,

you're going to need to get a

subscription again. If you

are targeting Safari or iOS,

you need to add a vapid subject, a URL or

a mail to address

that identifies your app,

Apple requires that and will turn a bad

JWT token error without it.

It looks like I might have been

incorrect on this, there is a little bit

of client side setup. It

requires two things, a service

worker, and a call to push manager

subscribe, but they explain

how to do all of that right here.

It's very simple. There is a basically

two steps on how to do this. And then

here's how you actually

set up the subscription. So there you

have it, there's managing

subscriptions written in here.

And then there's of course, information

about how you actually go

about sending that notification.

It's just another channel called web push

channel. That's all it

is. And it's beautiful,

looks great. I'm actually super excited

to check this out for all

of our internal applications

that we have, and see how this is

different than what I've had in the past.

I feel like I've tried

some of these things before, but it is

not this, it was not this. And so I'm

interested to see exactly

what the difference is. But you know,

what's written on the tin

here is that you can make

push notifications, reach your users,

even when they don't have your browser

tab open. That's the

big selling point here, they do not have

to be on your website in order to receive

a push notification,

no native app required, it just goes to

their, you know, to the

desktop. So pretty cool. Great

selling point if you can get it to work.

So check this one out if

that's something you'd like to add

to your project. Tver workflow is a

declarative PHP workflow engine with

async job execution.

The word escaped my brain. When your

application needs to run a sequence of

steps, some dependent

on each other, others that could run at

the same time, it's

tempting to stuff everything into a

single class or chain method calls

together. The Tver workflow package

offers a cleaner approach,

declare your jobs, wire up their

dependencies and let the engine

automatically determine execution

order. I feel like 10 years ago, we were

building workflow engines.

Well, I know I certainly was.

So it's nice to see that there's a

package that is that is here for me now.

I consider a user registration flow that

needs to create the user

account, send a welcome email,

set up a free trial subscription and

notify your team on slack.

Some of these steps depend on the

account being created first, while others

can run in parallel once it

has. Managing this manually

means tracking shared state writing glue

code and handling partial

failures yourself. Workflow

handles all of that declaratively. You

can define a workflow using a global

workflow helper function

which allows you to then specify create

account as a method, run

sync, send welcome email,

run async, create trial, run sync with a

run if condition and

notify team which also runs

async. A few things worth noting here,

sync will block until

the job completes whilst

async runs concurrently once its

dependencies are met. Variable is a

placeholder for a value,

you supply it runtime, you can specify a

response referencing an

ID field from a previous

workflow tasks response or from its

output. And then as I

mentioned, you've got the with run if

method which makes the corresponding

variable job conditional

and it is skipped entirely

if the value passed is false. The engine

builds a dependency

graph from the declarations

because send welcome email and notify

team both depend only on

create account. They will run

concurrently once the account is ready.

None of that will have made

sense. Maybe there will be a

visualization in the the YouTube video.

I'm sure that our wonderful

editors will get out a short

with more coherent information onto

socials as well. Each job can be a

closure, it can be an

invocable class or a class extending

Shavir's action. A

straightforward invocable is just a

plain action that a plain class that

extends an action, you give

it an invoke method and it does

whatever it needs to do kind of like a

job class in Laravel. Anyway,

to run the workflow, you pass

your variables directly to the run

function and access any jobs

outputs from the results. If any

job throws workflow wraps it in a

workflow exception that tells

you exactly which job failed

and why and for jobs that call external

services prone to

occasional hiccups you can attach a

retry policy using the with retry method.

A dedicated package brings

first class Laravel support

adding artisan commands and abstract

workflow base class and a

facade for running workflows

anywhere in your application. If you use

VS code the package has

an official extension that

renders your workflows as a mermaid flow

chart and this diagram

shows each job as a node, draws

edges between dependent jobs and

annotates those edges with the data

flowing between them so you

can see at a glance what SendWec welcome

email waits on or that

create trial will only run when

enable trial is truthy because the graph

is derived directly from your code it

stays accurate as you

add or rearrange jobs with nothing to

maintain separately. Shavir

workflow provides structure

for multi-step processes that would

otherwise scatter logic

across multiple classes or make

a single method unwieldy and the

declarative style makes it easy to see

what runs when and the

automatic dependency graph means parallel

execution happens with no extra

configuration. You can check

out the repository on github for the full

feature set including

action classes workflow providers

and the VS code extension. We'll have

that and a link to the

article which will explain this in

greater detail with examples in the show

notes. I gotta say this one probably

could have been almost

like in the tutorial realm it was really

comprehensive but I

will say this it's a this

isn't a bit of a bit of an advanced

package I think this isn't

one of those ones you just sort

of like sprinkle on top you know a lot of

the stuff we talk about here it's like

hey if you want just

this extra little thing you know here it

is no this is more like

this is going to handle the

business and domain logic of your

application it might be I don't know

maybe for some people it

would be a really welcome refactor maybe

there's a lot of things

that they don't have built that

they kind of need to do some of this with

and this would kind of

just bring some sanity to that

I could see that being the case and it

does seem like a very nicely

done package it is not specific

to Laravel it's a Laravel adapter but it

also is just available to

be used with with you know

straight up just PHP as well so really

really cool stuff there

that is a great one although

it is a difficult one to explain so I

would read that one as well yeah um

speaking of something

that's really foundational here Laravel

shopper is a headless e-commerce admin

panel for Laravel so

the thing that's interesting about this

one is that it's number one

is built on the tall stack so

if that's your jam you're in luck right

oh man I just use the word tall and

jammed in the same one

and they're not they're completely

opposite stacks rather than shipping a

pre-built store front though

this thing focuses entirely on the back

office side of things so

we're talking about the product

catalog the orders that are coming in

managing your customers

discount codes managing your team

who can get in and manage these products

and things like that then

it leaves you to build that

customer facing front end with whatever

technology fits your project so React,

Vue, Svelte you want

to use whatever those are front you want

to use server rendered blade

files that's fine too right

you can do all that this just doesn't

concern itself with that

which I think is a huge benefit

because AI is great at developing front

ends right that's

wonderful but a lot of times like

the difficult decisions you need to make

about how the back end

should be structured and the

hard fought logic that lives in your app

after lots of like

injuries and scar tissue right to

teach you how to do it the right way

that's the sort of stuff that is a little

bit harder to develop

with AI and this gives you a super solid

foundation to work with so what's in the

box we have products

and catalog items so you got things like

inventory tracking image

galleries and collections things

like that it will do your order

management and fulfillment shipping

details things like that store

admins can process orders update tracking

information manage refunds

it's all in one dashboard there

customers as we talked about with things

like purchase history

their saved addresses contact

information for them discount codes will

be talked about roles and

permissions for your team double

factor two factor authentication is

available for admin accounts adding that

second layer of security

of course we have to think about payment

gateways it ships with

Stripe out of the box it does have

a manual driver for cash on delivery or

pay in person scenarios so

the Stripe driver handles the

full payment life cycle including like

initiating that payment

intent all the way through

authorizing it capturing it refunding

canceling processing so that

is the one to use if you can

but it doesn't have other options you can

build it there's of course

configuration and things like

that you can extend the control panel

because it is just tall stack

and i did say this it doesn't

ship with a front end however if you'd

rather not build the storefront from

scratch they do have like

a starter kit that will give you a bolted

on storefront to get

started the livewire starter

kit is available now it's built with

livewire three flux ui

tailwind css four um sorry tailwind

css version four and it covers all the

all the things we're talked

about already like browsing

the products cart management multi-step

checkouts etc lastly but not

leastly it is also ai ready it

has larval boost support out of the box

so it has three specialized

skills that help ai agents

understand the code base from the first

time you install this and when it's

installed boost will

detect those guidelines and skills

automatically no extra configuration

needed um really great

package here really really good stuff and

you can see a demo i

believe at larval shopper.dev

docs.larval shopper.dev great stuff there

larval brain is a package that scans your

larval application and renders an

interactive graph of

how requests flow through it you can

install it run the scan and

get a visual map of your routes

controllers services repositories models

jobs events artisan command

schedule tasks and broadcast

broadcast channels all in one place there

is a video from the

package creator that is just

a minute 20 goes through showing you how

it all works our fearless

leader eric barnes has put

together a three-minute video talking

through how this all works

and there is an interactive

lifecycle graph which visualizes every

route through your

application there's ai context export

which is a one click copy a structured

markdown snapshot of any

nodes call chain database

operations and source snippets for

pasting into any llm there is a rules

file generation that

generates context and rules for seven

different ai coding assistants there is

route stress testing

you can run concurrent http load tests

against any route node

with configurable concurrency

headers and body and you can watch mode

and fat class detection

which auto risk ends on

php file changes and flags controllers or

services exceeding 300 lines or 10

methods as complexity

hot spots there is uh the interactive

graph the ai context export all of these

things are available

to you each supporter tool gets its own

rules file populated

with your projects actual

architecture routes packages and code

health data rather than generic

boilerplate you can find full

installation instructions and the source

code on github willing to

all of that including these

videos in the show notes i'm doing that

tonight i literally cannot wait it's

gonna be awesome i've

needed this and that is super cool so

definitely checking that one

out okay the next one is almost

just as cool it is pretty darn cool

though um larry vall chronicle is the

next one and it's talking

about audit logs a lot of us have this

need to have these audit logs our

solution is sort of a

lot of times like spas the activity log

and throw that in there and

now we have a database table

full of activity records so it's easy to

query right but it's also

just as easy to quietly delete

or edit a row and there's nothing in a

typical larry vall package like that

that's going to tell

you that that happened larry vall

chronicle approaches us a little bit

differently so here's

the clever bit about it rather than just

writing those rows to a

table it builds a cryptographic

hash chain it almost sounds like

blockchain uh for every entry using sha

256 so each new record

incorporates a hash of the previous one

so the entire ledger is

interconnected so if you remove

an entry that chain breaks and then

chronicle is going to tell

you about it like hey somebody

modified a previous record that's so cool

to me i love that and so the

rest of the the rest of the

package uh right up here is just how to

use it right it's the api

it's simple enough there's

really not anything i need to explain a

lot i'll talk about high

level here you can put in the

record an actor in action a subject

metadata tags and then you commit that

thing and every entry

needs an actor and action and a subject

at the very least those

metadata and tag fields are just

for extra stuff that you might want to

attach attach context uh

that would make sense for your

domain then for querying these entries

it's similar right it looks

like a model it's just entry

double colon for actor for subject look

for an action look for

something with this tag

and for large ledger chronicle supports

streaming of those entries one of the

time using a database

cursor so it's not loaded all into memory

it's going to keep that

memory constant no matter how

many entries there are because it's going

to stream those things up

handles paginated browsing

without loading the entire table again

you can prove the ledger hasn't changed

by doing a chronicle

export you can verify that export it's a

really good fit for

applications that require these

audit trails compliance workflows

financial records security

logging um you know anything

where like if you were getting a forensic

analysis because

something went wrong it's going

to hold up to something like that so you

can find the full source and

documentation for this on

github super cool love this idea laravel

clickhouse is a database driver that

integrates clickhouse

with laravel including eloquent the query

builder the schema builder

and more package features

include eloquent models with

non-incrementing id support a query

builder with clickhouse specific

clauses like final array join and sample

a schema builder with engine

partitioned by order by and

low cardinality column types migration

support via artisan migrate concurrency

query execution using

guzzles async http pool and dual http

transfer options supporting

both guzzle and curl slash

php clickhouse clickhouse is an open

source column oriented database built for

analytical workloads

workloads it stores data by column rather

than by row making aggregations over

large data sets fast

and it is capable of querying billions of

rows in seconds it is a

common choice for event tracking

time series data and analytics dashboards

where read performance at

scale is the priority if you

didn't know just just archer gave a talk

about um these types of

databases olap i think they

are called um at laricon nashville a

couple of years ago clickhouse sits

behind um night watch

larval night watch and powers a lot of

the functionality in

there so we talked about the

features that are available it supports

concurrent query execution

as well so you can do parallel

fetches from different tables um for

example if you wanted to

query both users and events

concurrently you can do that and the

results are returned as a keyed array

once all the queries

are resolved you can find the full

documentation and uh source on github

links of course always

every time in the show notes very cool

okay this next one is

equally awesome this one is called

wire bones and is by felipe martins and

i'm trying to remember

what these are called uh it's

like a skeleton file right so if you've

ever been on facebook or um like airbnb

and you click through

to something and while it's loading you

get this placeholder

template where it looks very similar

to what the content is that's going to be

loaded on the page there's

sort of placeholders in all

the spots where an avatar would be

there's like a little circle and there's

a panel like a you know

an outline of a panel and maybe a a

square where there's going to be a

picture of the property that

you're going to be looking at renting but

it's just sort of a

placeholder there that gives you a

clue a hint as to what's going to be

loading into the page well that as you

might imagine is a bit

of a chore to undertake a lot of people

don't end up doing it right

or if they do it they do it

poorly it's just generic and it doesn't

really match your layout

because it's just a pain in the

neck this solves that problem completely

it's really cool it takes

in uh your page it loads

into headless chromium it traces that

rendered layout and then it

writes a matching skeleton

blade file that livewire will serve while

that lazy component boots

so i have to say this it is

for livewire right so this is not a

solution for everybody it is a solution

for livewire so because

the source of truth is the rendered

component rather than this parallel

template you don't like

get this design rot where you make a new

change to the template and then your

corresponding change

doesn't make it into that other template

you just rebuild it and so this will

rebuild any files that

are a part of the VIT serve so it will

automatically rebuild those affected

skeletons uh it also this

was the thing that blew my mind number

one this is a demo you should go check it

out it's at wirebones.leravel.cloud

the demo is responsive that was my first

question is like is this

responsive right how do you handle

that it is it will capture those multiple

viewport break points in one

build and then build them all

for you so it scales it's really quite

incredible um it also has

authenticated routes supported so

sometimes this can be challenging if

you've got like that VIT serve but the

page that you're looking

at is behind a guarded route sometimes it

won't you know you can't get

that well this handles that

it will use browser cookies headers or

playwright storage

state to get to those things

and then you just drop this into live

wire using the lazy defer or

lazy bundle it also as we've

discussed with some of these other

packages has a layer of boost skills

included it picks up those

conventions automatically and as I said

previously the rest of this

is just how you implement this

i'm not here to tell you how it works

exactly i'm here to get you excited about

the package and then

you can go look at it it's very simple of

course as all these level

packages are there's a nice

little live wire component that ships

with it there's a ph we

artisan command of wire bones build

that's that's all you need to know the

rest of it is details so very cool check

this one out yes the

last package we have for you this episode

is the ability to attach

addresses to any eloquent model

with larval addressable larval

addressable is a package by luca longo

and gives any eloquent

model a polymorphic addresses relation

dedicated billing and

shipping traits a freeform jason

meta column and geospatial distance

queries all wide up through a single

migration and a trait

features include it being polymorphic by

default allowing you to

attach addresses to any model

without extra join tables billing and

shipping traits that provide shorthand

relations and helper

methods scoped per address type there is

primary address toggling with mark

primary and unmarked

primary with scoped events dispatched on

change geospatial support

storing a point column and

query by radius distance or nearest

neighbors which requires my

score eight plus marie dv 10.5

plus or postgres with postges uh

extension the jason meta column allows

you to attach arbitrary

extra data like phone floor delivery

notes to any address and a configurable

display format format

accessor built from a template you

control in config you can install the

package using composer

and the appropriate trade add the

appropriate trait to your

model and this will give you a

general purpose addresses relation on any

any model so this is the

has addresses trait that

has billing addresses and has shipping

addresses traits each add

typed relations and scoped

helpers for models that need to

distinguish between address types and

with those traits in

place you get specific methods billing

address billing addresses and the

shipping equivalents

adding an address to a uh adding an

address to a method adding an

address to a model is a single

method call so you give it a label uh

street address one zip or

postcode a city estate in

the country and the meta jason column

lets you store anything that

doesn't fit the standard fields

without touching the schema add the

display address accessor

formats and address using a

template from the addressable

configuration and the default produces

strings like i don't know like

an address on one line that you wouldn't

expect and you can swap the

template for anything that

your ui expects and for applications that

need location aware

queries the package stores

coordinates as a spatial point column

backed by a larval eloquent spatial

package and add scopes

for radius filtering and nearest neighbor

sorting there are

query scopes for primary

yeah it's it's handy the that's that's

like the top level point

for me right there like that's

really really nice to see like i wonder

how it handles the

geocoding of the address to two

coordinates so that'd be an interesting

one um but yeah it has

query scopes for primary billing

and shipping methods it is fully

composable you can mix them freely you

can use address query

billing primary first does exactly what

it says give me the

primary the first primary billing

address you can learn more about the

package via the source code on github

links in the show notes

we're going to wrap it up because we are

right up against one hour

tutorials i read them real

quick you want to hit them real quick do

okay hit them so the first

one is written by moses anumadu

and this one is about delivering

personalized content to your

users so you can think about

something like netflix or amazon or

something like that how they

look at what you're looking at

and they find other similar products now

in the past this would

have been done using like tags

and randomizing a suggested post it it

works it's just not precise um that

prediction isn't and so

really what this is building is this ai

powered recommendation

engine how is it working under the

under the hood it is basically converting

your posts into vector

embeddings which doesn't only

get the words it gets the intent of the

post right the meaning of

that post rather than just

keywords or tags and then we store them

in a mongo database and

then we use vector similarity

searches to find a related content and

present those to the user

so that's that's basically

what this one is you have to have a

working knowledge of laravel

uh have a laravel development

setup uh environment setup a mongo db

cluster and then have some blog data sets

for seeding our post

collection that's kind of what we're

looking at here so if that seems

interesting to you and

definitely read through this one it is

comprehensive it looks really good

similarly on that ai front

what about shipping ai with laravel this

is a uh course that harris

raftoffa raftoffas has been

working on i think this is like episode

six maybe something like

that uh but the thing that he's

tackling in this one is searching entire

pdfs with zero search logic

so in episode five the one just

before this we built semantic search from

scratch with embeddings

and pg vectors so if you're

interested in knowing kind of how it

works under the hood that's a

good one it's great for like

faq articles and full control over the

data but if you have a

documentation that is expansive it's

it's bigger than hundreds of pages of

policies product manuals

full pds you're going to need a

different approach and so this is where

you can hey we're going to

partner with an ai provider let

them handle the chunking embedding and

then we're just going to use

the sdks file search tool to

query it there's no similarity math on

our side we just upload and

search it how do we do that

and so in this episode he builds an

artisan command that creates

those vector stores uploads

those markdown files and then he goes

through how you can test

that and ship it to production

really really cool stuff there so

definitely check that one out as well

okay folks that wraps us up

on episode 258 find shownos for this

episode at larval or sorry podcast dot

larval dash news dot

com slash 258 if you liked the show rate

us up in your podcatcher of

choice that would be incredible

and uh have any questions feel free to

reach out to us on x at

michael duranda at jacob bennett or

at larval news whoo it's been a good one

mr duranda if you if you

haven't got tickets for

laricon us in boston at the end of july

time is running out they are

expecting a sellout so i would

imagine there are very many tickets left

so get on that if you are

still on the fence or waiting

for approvals or just haven't gotten

around to it yet time is running short

sell it to your boss i

feel like i got a a email from the team

that was like a sell it sell

it to your boss sort of thing

it's a bit tongue and cheek i thought

what's that now it was a

bit tongue and cheek i thought

oh was that i didn't read it i just saw

the email come through so

what was that i'm what was it was

a joke i don't think it was a joke i

think it was serious i just i think it

was a bit tongue and

cheek the way that it was uh written i

can't find where i where i saw this now

but uh oh i remember

here we go here we go here we go here we

go dear sir slash madam i

kindly request funds to attend

this year's laricon us in boston

massachusetts while my work has been

satisfactory i believe

i could deliver even more shareholder

value by learning and

networking with the esteemed

artisans of the larval community i must

impress upon you that

failure to attend would be a grave

misfortune not only for myself but for

the company the code base and indeed the

broader trajectory of

software development as we know it

furthermore if i go with my

colleagues we can secure larval's

finest discount to neglect such a

discount would be i believe a dereliction

of fiscal responsibility

oh boy there is the great tailor ottawa

himself once said elegant

code is not born it is forged

preferably boston in july with the

highest of regards

aspiring larval artisan ps there

will be a dodgeball tournament this is

not relevant to the

business case love this wow

what a great email that's lovely i would

i would send that i would

send that just enough humor to

kind of get them engaged and continue

reading but enough

seriousness to actually sell it so

hopefully we can see you there folks it

has been a fun time until

next time we'll see you bye

Creators and Guests

Michael Dyrynda
Host
Michael Dyrynda
Dad. @laravelphp Artisan. @LaraconAU organiser. Co-host of @northsouthaudio, @laravelnews, @ripplesfm. Opinions are mine.
Interruptible Jobs, Queue-wide Inspections, and Idempotency
Broadcast by