Hey, don’t do that! High coupling with the framework makes maintenance and upgrades a nightmare, and it also limits your system’s scalability.
I know it’s a quick way to build something, and it might work for a while, especially if you’re building a CRUD app.
But here’s the thing: a good framework should stay out of your way. Frameworks are meant to solve specific problems, not be the center of your system. Laravel and Symfony are great for:
- UI (CLI/Http)
- Routings
- Backend HTML rendering
- Handling and validating input/output
And probably a few other things.
Try to build your system’s core as if it knew nothing about the framework. That way, you’ll have a more flexible and maintainable system.
That’s what sets software engineers apart from "framework developers".
Frameworks come and go, like Zend. Don't let your system die with the framework (or framework version)
Laravel only needs one thing from you.
That you embrace it.
Kiss it even.
Delegate as much work to the framework as possible.
Don't reinvent the wheel.
For instance, are you feeling like creating a src directory?
Don't. The app directory is what you're looking for. âś“
Feeling like creating modules?
Don't. Subfolders inside the default structure is what you're looking for. Keep it familiar for your coworkers to ensure maximum productivity. âś“
Feeling like coding a feature from scratch?
Don't. Laravel probably offers it already. And third party packages are already there too. âś“
Be the kind of developer who delivers and leaves a clean legacy.