Recent posts with #laraveltips

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

β€’ β€’

48

β€’
β€’

πŸš€ Excited to share my take on taming business logic in Laravel with Actions & Services! πŸ› οΈ Say goodbye to bloated controllers with my practical approach using OrderCreateAction for operations and DeliveryScheduleService for reusable logic. Check out tips, code examples, and a decision matrix to keep your Laravel projects clean and scalable. Inspired by @nunomaduro and others.
dev.to/tegos/laravel-actions-and-services-360d


#Laravel #PHP #LaravelTips

β€’ β€’

76

β€’
β€’

Laravel Validation Rules – Part 2 is out now

Level up your validation game with more useful rules and clean code tips

Watch now:

youtube.com/shorts/1smqr6QRekg?si=sm3D5SUQYOrpY-1J

Don’t miss Part 1 too youtube.com/shorts/3WazctdJRac?si=_N1fYWp1gqty_LN_



#LaravelValidation #WebCruxTechnology #TechWithJinal #LaravelTips #DevShorts #CodeQuickie #PHPTutorials

β€’ β€’

91

β€’
β€’

New Tech Short is Live

Learn something new in seconds – check out our latest YouTube Short:
πŸ”— lnkd.in/d4RgFc7E

If you enjoy quick, valuable dev tips and insights, don’t forget to drop a like & subscribe

🌐 Stay connected across all platforms and follow our journey at WebCrux Technology:
πŸ”— lnkd.in/eJdj_Y6n

Let’s build and grow together

#TechWithJinal hashtag#WebCruxTechnology #YouTubeShorts #LaravelTips hashtag#WebDevelopment hashtag#TechCommunity #CodingLife #DevShorts

β€’ β€’

86

β€’
β€’

Did you know Laravel provides firstOrCreate() to find a record or create a new one if it doesn’t exist?

If the email exists, it returns the user. Otherwise, it creates a new one.

βœ… Prevents Duplicates
βœ… Saves Multiple Queries

#Laravel #LaravelTips

image

β€’ β€’

56

β€’
β€’