Cool Tips (@coool_tips) header
Cool Tips (@coool_tips) profile picture

We are friends who love programming and we would like to help learn it and spread it to others and help solve the problems that our developers friends also face

Aga, Dakahlia, Egypt
Joined May 2022
Laravel tip. A catch-all route like /{slug} can swallow other URLs, like /admin. Add a negative lookahead to its `where()` regex: `(?!admin$)`. Now it matches every slug EXCEPT the ones you list.
1
3
19
1,634
Cool Tips retweeted
Flock 1.0 is out! 👀 A free, open-source local development environment for PHP and Laravel. • PHP and Node.js versions per project • MySQL, PostgreSQL, Redis, and more • Local HTTPS and .test domains • Mail catcher, dump viewer, and Xdebug • MCP integration for coding agents Runs natively, no Docker required. Windows, macOS, and Linux supported.
22
19
3
189
7,980
Laravel tip. Data you add with `Context::add()` follows the request EVERYWHERE. It gets attached to every log entry, and it is passed into every queued job you dispatch. Set the tenant ID once in middleware and read it back inside the job.
9
6
47
2,257
Cool Tips retweeted
PHP: if I'll be dead; half of the internet too! 😂
7
38
5
200
4,401
Cool Tips retweeted
👀 Using with() but still getting N+1 queries? Laravel's chaperone() fixes a sneaky Eloquent case you might be missing. 👇
1
7
51
2,003
AI made it easy to implement almost ANY feature request. Which is actually dangerous. Now you can turn a simple, useful app into a bloated monster quickly. With features that no one ACTUALLY asked for. Hiding the MAIN feature of your app. Simplicity can still be the moat.
2
3
25
1,812
If you think Laravel will be irrelevant in new AI agentic era, think again. Laravel has been evolving over the years, keeping up with the market demand. So in 2026, it will be a foundational framework for A LOT of software built with/for AI.
16
17
3
162
6,537
Opus 5.5 one-shot of an @inertiajs adapter for Axum (Rust HTTP router). Axum + Inertia + React ⚙️
50
41
9
762
57,887
Laravel tip. `firstOrCreate()` doesn't say which path it took. Check `$model->wasRecentlyCreated` afterwards: true means it was just inserted, false means it already existed. No extra query needed.
1
2
15
2,221
Random fact: in @laravel AI SDK, if you choose the default provider and default model for your agents, the default is OpenAI with GPT-5.6-Terra. But those defaults are changing with new versions of both models and AI SDK.
4
1
1
22
2,233
Now THAT was fast!
Jev support has landed in 1.x branch of the Laravel AI SDK. github.com/laravel/ai/pull/1…
1
25
2,760
Useful Laravel package! Torann/laravel-geoip: Determine the geographical location of website visitors based on their IP addresses. github.com/Torann/laravel-ge…
2
5
1
46
2,931
Need to send a #Laravel notification to someone who doesn't have a user account in your database? Skip the model entirely. 🎯 Use Notification::route() to send it directly to their email:
2
1
17
1,104
Did you know about this interesting Laravel package by @spatie_be? spatie/laravel-db-snapshots: Quickly dump and load databases github.com/spatie/laravel-db…
2
9
60
3,559
#Laravel Tip Did you know... Laravel understands your relations and lets you write much cleaner code👇
1
3
40
1,426
#Laravel Tip Did you know... You can fetch a single column directly with value() — simpler & faster than first().
2
3
39
1,079