Yep, agreed!
Yep, agreed!
Of course, these are just the fundamentals, and with Laravel, there's way more you can do to multiply your power level, such as the scheduling of periodic tasks (e.g. statistics calculations/updates) that you can store/keep warm in the cache, but the opportunities are endless! 👍
Now, technically there is one other benefit to queueing; Imagine spills your coffee mid-prep. ☕
- ✅ With a queue: They’ve got your order ticket and just start over.
- ❌ Without a queue: You awkwardly re-explain your triple-shot, half-decaf, oat milk latte.
For example, imagine you're ordering a coffee at a busy cafe:
- ✅ With queues, you'd get a buzzer and can sit down and relax until your coffee is ready
- ❌ Without queues, you're awkwardly standing at the counter until it's ready
In both cases, the barista' work just as hard
In most cases, I'd recommend #2 even if you need a response right now.
Why? It's simple; For the most part, "right now" is a concept that mostly applies to humans, less so to computers.
While "queueing" sounds slow and negative (nobody likes queues), they're definitely not.
You might ask; but what about things that need a response _right now_? And to that I'd say you have two approaches:
1. Lie about it succeeding (e.g. "an email has been sent")
2. Add a "processing" state, and use polling/websockets to get an update the second something's done.
Examples of things you'd queue:
- ✅ Sending an email
- ✅ Calling a third-party API to send/fetch data
- ✅ Resizing an uploaded image
- ✅ Processing a payment or order
- ✅ Handling an incoming webhook
My advice to any web-developer; Treat your incoming requests like hot potatoes🥔🔥
Validate the input, store it in the database, dispatch a queue job if needed, and let the user know everything's great _immediately_.
Processing any logic is the queue worker's problem 😏
Yeah, I think the PHP 8.0 Attributes are a syntaxical crime against developers.
It's like that one ex I regret but can't seem to escape.
PHP 8.4 was just released ✨
✅ Property hooks - pure magic!
✅ Parentheses-free `new MyClass()->method()` -finally!
⚠️ Asymmetric `public private(set)` - a feature and a vibe
❌ `[\#Deprecated]` - Ironic. Should've `@Deprecated` it's own syntax instead
But hey, 2.5/4, not bad!
Phew, at least it ain’t me this time
Of course! 👋
I've just released version v1.4.0 of my Word Generator package. ✨
- ✅ You can now generate more complex words (uses multiple adjectives)
- ✅ It now ships with 3x the amount of adjectives & nouns by default!
github.com/claudiodekke...
Sous vide is the best
Ok Laravel folks, it's time to increase your bcrypt rounds because 10 is no longer considered secure enough.
securinglaravel.com/p/security-t...
#PHP #Laravel
document.write(
"<?php echo 'Hello World!'; ?>"
);