I know Lumen is like Laravel but for API. But it is really worth it ?
I have few question because I wan't do make an API.
1- Is lumen is going to stay as lumen and not be deleted in the future ? I mean Laravel is not going to be like SF4 and propose a graduate intallation by bricks https://100001.onl/https://1921681254.mx/?
2- If Lumen doesn't have blade, can I install it to send mail ? I heard notification is not much as Laravel has.
Lumen is only useful for tiny APIs that just need to chuck JSON from Eloquent models. Anything more, it becomes a pain in the ass.
I’ve literally just re-platformed a massive project in my day job from Lumen to Laravel because Lumen doesn’t have features that Laravel does that are handy for even API-only development: route–model binding, form requests, Eloquent API resources, etc.
@chr15k Yeah, Lumen’s still lacks from route–model binding and form requests, though. Which to me, are two extremely helpful things for building an API.
There’s also things like the Dispatchable trait from queued jobs, so you can’t do SomeJob::dispatch(); you have to either use the global helper (urgh) or inject the Dispatcher interface into the class you want to dispatch a job.
We spent so much time back-porting missing features from Laravel on a project at work that it just got to the point of, “Why don’t we just use bloody Laravel?” I would have just gone with Laravel in the first place, but the team had already decided on Lumen before I joined.
@martinbean Yeh, all comes down to requirements doesn't it; if you need those features then going with Laravel makes more sense.
I can see Laravel being the viable choice in most cases, even when you look at it from a performance perspective (Lumen known to be able to handle more requests per sec. etc), once the app touches a database, there really isn't much in it.
Funnily enough, I'm starting a new job next week and they use Lumen for a lot of projects, so it'll be interesting to see the use cases and whether they've also back-ported features from Laravel framework :-)
I can see Laravel being the viable choice in most cases, even when you look at it from a performance perspective (Lumen known to be able to handle more requests per sec. etc), once the app touches a database, there really isn't much in it.
@chr15k Yeah. That was exactly the reason they chose Lumen. They’ll have created a new Lumen project, a new Laravel project, and found Lumen can serve more requests per second for a “Hello, world” response, but that then doesn’t take into account the code that’s then been added to the Lumen application and features Laravel support such as config caching and route caching.
YES Lumen is dead in my opinion because the core purpose of it is no longer exist, Laravel now should be able to handle any project API or web sessions, if you configured it right, it should be whatever you want it to be