Advertisement · 728 × 90

Posts by Codecourse

Even with middleware, double-clicking a form can still trigger the request twice if the token isn’t managed per submission. Logs will show both hits.

9 hours ago 0 0 0 0

Problem: middleware runs globally, so it can override the token generated in the controller. Important to understand execution order in Laravel.

13 hours ago 0 0 0 0
Generating a Token in Middleware
Generating a Token in Middleware Want more? Explore the library at https://codecourse.comOfficial sitehttps://www.codecourse.comTwitterhttps://twitter.com/teamcodecourse

Prevent duplicate form submissions in Laravel without cluttering your controllers. Watch how we handle it with middleware in this episode:

15 hours ago 0 0 0 0

do you prefer middleware or inline form logic for handling one-time submit tokens?

20 hours ago 0 0 0 0

Instead of generating tokens in every form, move the logic into middleware. Cleaner, reusable, centralized.

1 day ago 0 0 0 0

Middleware isn’t just for auth. You can generate a unique token for each form load to prevent duplicates.

1 day ago 0 0 0 0

How do you handle double form submissions in your projects: JS, middleware, or both?

2 days ago 0 0 0 0

Duplicate entries are a common problem in forms. Generating a one-time token per form is a reliable solution

2 days ago 0 0 0 0
Advertisement

Accidental double submits can corrupt your database. Laravel middleware gives a clean way to prevent this.

2 days ago 1 0 0 0

what’s something you learned way too late in Laravel?

5 days ago 0 0 0 0

what’s the first thing you always check when real-time isn’t working?

6 days ago 0 0 0 0

do you test multi-user flows early
or only when something breaks?

1 week ago 0 0 0 0
Client to Client Whispering
Client to Client Whispering Want more? Explore the library at https://codecourse.comOfficial sitehttps://www.codecourse.comTwitterhttps://twitter.com/teamcodecourse

Most Laravel devs don’t get stuck on WebSockets…

They get stuck on:
“why is my channel failing to authenticate?”

We walked through exactly that in today’s video.

1 week ago 0 0 0 0
Client to Client Whispering
Client to Client Whispering Want more? Explore the library at https://codecourse.comOfficial sitehttps://www.codecourse.comTwitterhttps://twitter.com/teamcodecourse

We just dropped a full breakdown on real-time checkboxes in Laravel.

Not just “here’s how it works”
But the part people get stuck on:

auth + whispering + why nothing connects at first

1 week ago 0 0 0 0

real-time is where “it works on my machine” starts falling apart

1 week ago 0 0 0 0
Advertisement

real-time exposes your patterns fast

stuff that felt “simple” suddenly matters a lot more

1 week ago 0 0 0 0

Most devs use AI tools, but most also don’t fully trust them...

1 week ago 0 0 0 0

what changed in your code once you added real-time?

1 week ago 0 0 0 0

I think the weird part isn’t that Laravel makes real-time easy… it’s that we’re used to it being complicated

1 week ago 0 0 0 0

The next era isn’t prompt ops — it’s persistent autonomous agents running in the background.

1 week ago 0 0 0 0

what’s one thing beginners focus on too much…
and one thing they don’t focus on enough?

1 week ago 0 0 0 0

WWDC 2026 is around the corner 👀 what are yall looking forward to this year

1 week ago 0 0 0 0

Laravel makes real-time feel so easy it almost feels wrong

1 week ago 0 0 0 0

what’s one thing AI actually improved in your workflow… and one thing it made worse?

1 week ago 0 0 1 0

what’s something in Laravel you wish someone would just explain better?

1 week ago 0 0 0 0
Advertisement

First time setting up real-time in Laravel felt… suspicious like you run one command and suddenly it’s working no way that’s it

1 week ago 0 0 0 0

The “it works on my machine” mindset kills workflows, not features.

1 week ago 0 0 0 0

I’d rather slow down the queue than lose control of the entire workflow.

1 week ago 0 0 0 0

Stop thinking in steps. You should be thinking in workflows.

1 week ago 0 0 0 0

Do you actually test if your system fails cleanly?

1 week ago 0 0 0 0