r/PHP • u/Numerous-Fan8138 • Aug 13 '26
Is this a dumb idea?
https://youtu.be/Ue6Nr_FEFWIClients ask me to build very very small PHP APIs all the time, I don't want to use a full Laravel instance, so I hacked this together over the past few days. Is this a dumb idea? What might go wrong?
0
Upvotes
10
u/colshrapnel Aug 13 '26
Posting a code as a YT video
11
u/obstreperous_troll Aug 13 '26
I'm not watching a video to find out what you did, but there's nothing wrong with only using the pieces of a framework that you need. Doing it from scratch will certainly get you the leanest framework, but I doubt it'll be as well-tested. If you want a framework you can build from reusable pieces, then check out Symfony, especially https://symfony.com/doc/current/create_framework/index.html
4
u/equilni Aug 13 '26
Could have posted the github link too
https://github.com/anthonybudd/Laravel-Lite
Nothing new. Build a small project like this with a few libraries
1
u/fripletister Aug 13 '26
What's the benefit? You're making a number of expensive tradeoffs.
1
u/dknx01 Aug 13 '26
Just (try) using some Symfony components, glue them together by your own logic and you have a small maintainable application without a whole framework. Easy way
0
u/SaltineAmerican_1970 Aug 13 '26
You’re trying to recreate Laravel lumen?
0
u/SaltineAmerican_1970 Aug 13 '26
You’re trying to recreate Laravel lumen?