Recent posts with #PHP

πŸ’‘ Sometimes you don’t need a DB column.

For one-time values like email verification tokens or OTPs β†’ just cache them.

Auto-expiry πŸ•’
Cleaner schema 🧹
No leftover columns 🚫

#Laravel #PHP
image

2 β€’ β€’

197

β€’
β€’

Just updated my PR for Laravel Rector! πŸ’ͺ

It now converts array access β†’ Arr::get() (instead of data_get()) for:
βœ”οΈ Simple keys
βœ”οΈ Nested keys (dot notation)
βœ”οΈ Defaults
βœ”οΈ Preserves throw expressions
Cleaner & safer Laravel array handling ✨
#Laravel #PHP #Rector
image

1 β€’ β€’

42

β€’
β€’

A new community contribution has been featured on Filament Mastery - a great resource for those building with Filamentphp.

πŸ‘‰ filamentmastery.com/community-links/13



Thanks to @ASSEM for the continued inspiration!

#filamentphp #Laravel #PHP #DevCommunity

β€’ β€’

59

β€’
β€’

Laravel Performance Tip πŸš€
Stop hitting the cache twice! Many devs do `Cache::has()` before `Cache::get()` - but that doubles the work for the same key.
Benchmarks say it all:
- ⏱ Execution: 14ms β†’ 6ms
- 🧠 Memory: 47MB β†’ 43MB
- πŸ”‘ Cache calls: 2 β†’ 1
βœ… Fix: skip `has()`, just `get()` and check for null:

$value = Cache::get($key);
if ($value !== null) return $value;

Tiny tweak, huge impact under load. Full examples and results in the article!
dev.to/tegos/laravel-cache-tip-avoid-redundant-hasmissing-calls-4hi1

#Laravel #PHP #LaravelTips

β€’ β€’

51

β€’
β€’