Sign in

Renato Hysa

@hysa.dev
48 followers 91 following 232 posts

Building @gaplos.com | Crafting the next-gen Laravel boilerplate using DDD (95%+ coverage) | Turning curiosity into code | Open for work 🚀

PostsRepliesMedia
Renato Hysa @hysa.dev · 20/11/2025
🏛️ DDD in Laravel = everything has a home. What you get: ✅ Business logic in Domain layer ✅ Orchestration in Use Cases ✅ Framework code isolated ✅ New devs onboard faster $order->cancel() > $order->status = 'cancelled' Structure brings clarity 🎯 #PHP
020
Renato Hysa @hysa.dev · 13/11/2025
🔥 Unpopular: Model factories are overused. Most tests need: ❌ User::factory()->create() ✅ User::create(['email' => 'test@test.com']) Save factories for: * Database seeding * Complex relationships * Random data generation Be explicit. Be clear 📝 #Laravel
010
Renato Hysa @hysa.dev · 12/11/2025
🔥 Controversial: Static methods are fine, actually. Good static use: ✅ Math::round() ✅ Str::slug() ✅ Carbon::parse() ✅ Validator::make() Bad static use: ❌ DB::query() ❌ Cache::get() Context matters. Stop the dogma 🎯 #PHP
010
Renato Hysa @hysa.dev · 09/11/2025
⚠️ Singleton = anti-pattern alert. Problems: ❌ Cannot mock for tests ❌ Global state ❌ Hidden dependencies ❌ Hard to maintainUse Dependency Injection instead ✅ #PHP
010
Renato Hysa @hysa.dev · 08/11/2025
🏭 Simple Factory = clean object creation. Perfect for: ✅ Dynamic object instantiation ✅ Mockable for testing ✅ Type-based creation ✅ Centralized logic One factory, many objects 🚀 #PHP
010
Renato Hysa @hysa.dev · 07/11/2025
🔄 Prototype = clone instead of create. Perfect for: ✅ Mass data operations ✅ Expensive object creation ✅ Bulk record generation ✅ Pre-configured templatesClone it, don't build it 🚀 #PHP
010
Renato Hysa @hysa.dev · 06/11/2025
♻️ Object Pool = stop wasting time creating objects. Perfect for: ✅ Database connections ✅ HTTP clients ✅ Expensive resources ✅ High-frequency operations Reuse, don't recreate 🚀 #PHP
000
Renato Hysa @hysa.dev · 05/11/2025
🏭 Factory Method = dependency inversion done right. Perfect for: ✅ Multiple logger destinations ✅ Testable with mock factories ✅ Database/file/cloud storage ✅ Zero client code changes SOLID principles in action 💪 #PHP
010
Renato Hysa @hysa.dev · 04/11/2025
🔨 Builder Pattern = no more constructor chaos.Perfect for: ✅ Complex object assembly ✅ Multiple object variations ✅ Step-by-step construction ✅ Avoiding parameter overloadClean, flexible, maintainable 💪 #PHP
010
Renato Hysa @hysa.dev · 03/11/2025
🏭 Abstract Factory = object creation made elegant. Perfect for: ✅ Multi-platform apps (Windows/Unix/Mac) ✅ Swappable export formats (CSV/JSON/XML) ✅ Theme systems (Dark/Light) ✅ Test mocking without refactoring One interface, unlimited implementations 🚀 #PHP
010
Renato Hysa @hysa.dev · 01/11/2025
Nested if-statements killing you? Perfect for: ✅ Less cognitive load ✅ Obvious happy path ✅ Fail fast, win clear ✅ Reads like a checklist Guard clauses > pyramids of doom 🛡️ #laravel
131
Renato Hysa @hysa.dev · 31/10/2025
Still writing PHP like it's 2015? Perfect for: ✅ Less constructor boilerplate ✅ Clean match expressions ✅ Arrow function callbacks ✅ Self-documenting calls Modern PHP is clean 🚀 #laravel
010
Renato Hysa @hysa.dev · 28/10/2025
Breaking chains for side effects? Perfect for: ✅ Keep fluent chains flowing ✅ Debug mid-chain easily ✅ Side effects, no breaks ✅ Natural top-to-bottom code The chain never breaks 🔗 #laravel
000
Renato Hysa @hysa.dev · 27/10/2025
Processing huge datasets wrong? Perfect for: ✅ Handle millions of records ✅ Right tool for the job ✅ Safe updates while iterating ✅ Chain methods on big data Memory matters 🧠 #laravel
000
Renato Hysa @hysa.dev · 23/10/2025
Windows users don't know what this screenshot is 😂 #ai
000
Renato Hysa @hysa.dev · 22/10/2025
Laravel devs Why would someone prefer Laravel Nova over Filament PHP? Especially when you consider that Laravel Nova is a paid option. 🤔 #laravel
120
Renato Hysa @hysa.dev · 19/10/2025
Searching multiple columns with orWhere? Perfect for: ✅ Apply constraint to many columns ✅ No repetitive chains ✅ Clean content filtering ✅ Matches your intent One method beats ten 🎯 #laravel
031
Renato Hysa @hysa.dev · 18/10/2025
Query builder if-statements everywhere? Perfect for: ✅ Conditional clauses, no chain breaks ✅ Clean search filter handling ✅ No nested if-blocks ✅ Default behavior with else Keep the chain flowing 🌊 #laravel
110
Renato Hysa @hysa.dev · 17/10/2025
Collection closures too verbose? Perfect for: ✅ Call methods without closures ✅ Cleaner transformation chains ✅ Less boilerplate code ✅ Readable nested access One line beats five 📐 #laravel
110
Renato Hysa @hysa.dev · 16/10/2025
Queue jobs killing your API limits? Perfect for: ✅ Respect API rate limits ✅ Prevent service overload ✅ Per-user throttling ✅ No more 429 errors Background work, under control 🎛️ #laravel
000
Renato Hysa @hysa.dev · 15/10/2025
Manual JSON encode/decode everywhere? Perfect for: ✅ Rich value objects ✅ Auto encrypt/decrypt ✅ No manual transformation ✅ Encapsulated domain logic Work with objects, store as JSON 🔄 #laravel
100
Renato Hysa @hysa.dev · 14/10/2025
Model event logic scattered everywhere? Perfect for: ✅ Centralized event handling ✅ Clean, focused models ✅ Auto-sync across systems ✅ Isolated testing One observer beats 50 callbacks 🎯 #laravel
110
Renato Hysa @hysa.dev · 13/10/2025
Your API needs rate limiting Perfect for: ✅ Protecting against abuse ✅ Tiered access (free vs paid) ✅ Custom limit segmentation ✅ Fair resource allocation Stop bleeding infrastructure costs 💸 #laravel
011
Renato Hysa @hysa.dev · 12/10/2025
🧠 Stop querying the same data twice! Perfect for: ✅ Multi-pass processing ✅ Dashboard aggregations ✅ Complex reports ✅ Data transformations Laravel's remember() caches lazy collection results 💾 #laravel
110
Renato Hysa @hysa.dev · 11/10/2025
🔒 Timing attacks revealing your secrets? Perfect for: ✅ Authentication checks ✅ Password comparisons ✅ Cryptographic operations ✅ API key validations Laravel's Timebox ensures constant execution time 🛡️ #laravel
010
Renato Hysa @hysa.dev · 10/10/2025
🗑️ Laravel Soft Deletes = Never lose data Perfect for: ✅ Data recovery ✅ Audit trails ✅ Trash features ✅ Compliance needs Records stay in the database, just hidden 🔒 #laravel
110
Renato Hysa @hysa.dev · 09/10/2025
This is me, making sure that my calendar is full with content 🙂 Thank you gaplos.com 😎🙈
010
Renato Hysa @hysa.dev · 08/10/2025
🔒 Laravel Atomic Locks = Zero race conditions Perfect for: ✅ Duplicate prevention ✅ Critical operations ✅ Distributed coordination No external services needed 🚀 #laravel
110
Renato Hysa @hysa.dev · 07/10/2025
Prevent the same Laravel job from running twice simultaneously. Automatic queue release if job is already processing. Perfect for credit updates, reports, any operation that can't overlap. One line. Zero race conditions. #laravel
100
Renato Hysa @hysa.dev · 06/10/2025
Laravel Pennant = Feature flags without the complexity Roll out features gradually: ✅ 1% of users first ✅ Kill switch if issues ✅ A/B test variations ✅ Team-based access One Feature::define() call, check anywhere. Database-backed. Built-in caching. No SaaS fees. Pure Laravel. 🔥 #laravel
100
Renato Hysa @hysa.dev · 05/10/2025
🤯 Laravel Model Broadcasting = Real-time updates with ZERO boilerplate Add BroadcastsEvents trait to your model & Laravel auto-broadcasts: ✅ Created ✅ Updated ✅ Deleted ✅ Restored No custom events needed. Frontend gets instant updates automatically. This is why I love Laravel 🔥 #laravel
100
Renato Hysa @hysa.dev · 03/10/2025
🔥 Laravel's HTTP Client fires 3 events you should know about: 🎯 RequestSending - before the request 📨 ResponseReceived - after response ❌ ConnectionFailed - when it fails Perfect for: ✅ Logging all API calls ✅ Monitoring performance ✅ Error tracking Game-changer for API-heavy apps! 🚀 #laravel
100
Renato Hysa @hysa.dev · 13/09/2025
🧠 Your brain isn't built for memorization, it's built for recognizing patterns. Top devs don't memorize every function. They build systems for debugging, code review, and knowledge sharing. Solid systems = everything clicks Broken systems = spinning wheels #laravel #php #remote
030
Renato Hysa @hysa.dev · 11/09/2025
Who would have thought that I would get more views than StackOverflow in 21min. P.S. there are still questions being downvoted out of nothing 😂StackOverflow is a really dark place 😎
010
Renato Hysa @hysa.dev · 10/09/2025
AI cannot do this 😅
010
Renato Hysa @hysa.dev · 09/09/2025
A great way to start the week: github.com/symfony/ai #php
100
Renato Hysa @hysa.dev · 08/09/2025
Freelancing is dying... 5 minutes on Upwork and you will see countless examples like the one in the screenshot. Non-technical people create a prototype using AI and tools such as Lovable and call it production ready 😂 What you see in the screenshot, is 1/3 of the requirements
110
Renato Hysa @hysa.dev · 06/09/2025
Who remembers this github.com/laravel/laravel/pull/5361? 😅 #laravel
000
Renato Hysa @hysa.dev · 05/09/2025
Here are all the AI tools I use daily as a Software Engineer: 1. Copilot 2. Claude 😅
000
Renato Hysa @hysa.dev · 04/09/2025
PHP 8.5 new features: array_first() and array_last() functions 🔥 Works on indexed AND associative arrays. Returns the actual value, not the key. This is going to save so much time... what took them so long? 😅 #php
000
Renato Hysa @hysa.dev · 15/08/2025
The biggest scam of this century is not crypto. No, it's vibe coding. 😂 #vibecoding
000
Renato Hysa @hysa.dev · 28/07/2025
Your code broke in production. Here's how top developers respond differently 🧵
700
Renato Hysa @hysa.dev · 25/07/2025
You know what's better than reading 12 books a year? 2. Read 2 books that align with the person you want to become and read them daily and focus on the highlighted text. Don't push yourself reading 12 books when you read none, you will fail and then you are back to square one.
000
Renato Hysa @hysa.dev · 23/07/2025
Ever wonder why some codebases feel like they "just make sense" while others are a nightmare to work with? 🤔 After 16+ years in software, I've noticed a pattern...
700
Renato Hysa @hysa.dev · 21/07/2025
Stopping disposable emails in SaaS is crucial for data integrity & resource optimization. I always implement this when architecting systems! #laravel #php #ddd #cleancode #saas #softwareengineering
120
Renato Hysa @hysa.dev · 17/07/2025
Can AI automate my night routine? #32 I would pay hard for such a service 💆‍♂️ #ai Shared via gaplos.com
021
Renato Hysa @hysa.dev · 16/07/2025
Warm milk with honey 🍯before bedtime. Nothing can beat that 😋 An easy recipe to get 8 hours of sleep so we can code 12 hours tomorrow 😂 Shared via gaplos.com
010
Renato Hysa @hysa.dev · 16/07/2025
Embrace the beginner's mind 🌱 Put yourself in situations where you're a novice. Try new hobbies, explore unfamiliar subjects. When you feel the urge to pretend expertise, choose vulnerability instead. Fresh perspectives come from admitting you don't know everything. 🤷‍♀️
010
Renato Hysa @hysa.dev · 15/07/2025
What a world we live in 🤦‍♂️ Shared via gaplos.com
000
Renato Hysa @hysa.dev · 15/07/2025
Stay curious by asking better questions 🤔 Move beyond "What?" to: "Why does this work this way?" "How does this connect to what I know?" "What assumptions am I making?" "What would challenge my understanding?" The quality of your questions determines the depth of your learning.
000