@tmartinco I used it the other day for a YouTube proxy, as it seems Google blocks requests to the API from GoDaddy IP addresses.
I’d use Lumen for more web service-like projects (such as the above) where I don’t need all the bells and whistles of a full framework. Even though Lumen supports Blade, I would tend to use Lumen for projects where there isn’t a public front-end.
Personally I see it as being useful as an API endpoint for inbound webhooks. I do quite a lot with external APIs (Mandrill, Text messaging). All I need to do is authenticate the inbound request, validate the data and put it in a database.
Also, background queue processing is ideal if you need to contact outside APIs for entries in a list.
Similar to @gregrobson usage, I'm working on a service for handling my Stripe webhooks. Handle the incoming requests from Stripe, triggers queues and events for sending out emails, triggering events in the app to update the database, etc...
Just made a small API with Lumen that updates dynamic forum signatures. The builder app and accounts (like gravatar) is full fledged l5.
After some testing it is a lot faster (no update lag on third party sites anymore). It is running on the same server and database, but it is faster I am guessing mainly because the full l5 is running more checks and processing for a really just a quick call.
I'm not getting it. I believe I see the use, but it's for example more straightforward to create RESTful APIs in Laravel than in Lumen. Creating controllers too. Anything I'm missing?
@godabout, I think that the real benefit is going to be for people who have already been using Silex, Slim 3 or similar, in places where Laravel just doesn't make sense to use and the people who actually understand the architecture difference rather than folks who happen to know a little code, but aren't really developers.
@godbout RESTful APIs and Controllers are both easy to create in Laravel and Lumen. The main difference is that Laravel is focused on flexiblity and Lumen is focused on speed. I'm sure Lumen can be made more flexible and Laravel faster, but they have different intended use cases.
For any API service (whether sending out requests, or receiving them) speed is important - especially if 3rd parties don't allow batch requests. It would be rare to need to make big changes to the default exception handlers, authentication, controllers, IoC etc. Any API service probably won't need migrations as it's intention is to "sit in the middle" and keep things going back and forth between your application data store and external services.
I may be wrong but I think lumen is meant for simple REST apis or such things. There is a benchmark video of how many requests it can handle per second - which is quite a lot. Here are some examples I found to be quite good. Check out the first two posts.
@gregrobson Agreed. Still, I find weird that you can't use something like "Route::resources" and "artisan make:controller" when basically that's what you want for APIs. It shouldn't put much overhead on Lumen to get those things running. At the end it's less slick to get the structure of your APIs running under Lumen, which makes me wonder BUT OMG WHY???
@godbout Well Route::resource() is a bit slower then using Route::get(), so I think that's why it's left out. Most stuff people really like in Laravel might get added to Lumen but Taylor will need to modify it a bit so the speed of Lumen isn't touched!
They really just aren't needed. Why even have Lumen if all you are going to do is make it Laravel? Why does this even make sense?
Most stuff people really like in Laravel might get added to Lumen
Just use Laravel. Don't you think that if he could implement it any faster in Laravel, he would just do it in Laravel? Why leave it as is in Laravel and then
modify it a bit so the speed of Lumen isn't touched!
I think it is the perfect solution for building micro-services and blazing fast APIs. @samsoft it has never been easier to write stunningly fast services to support Laravel applications.
I agree with @dberry Seems a bit pointless to me - Laravel is not exactly cumbersome.
So I install Lumen then find my requirements change and need a feature that is only available in Laravel. Sure there is an easy upgrade but why should I even bother with any potential headache.
@LeBlaireau, I didn't quite mean it in that sense. I meant it is pointless to keep adding features to it to make it more like Laravel and have all of the features that laravel has. If you need that then just use laravel.
Lumen has a specific purpose, geared towards specific types of apps/services and doesn't need all of that extra.
Actually lumen in the vender files has most if not all of Laravel available it's just not set up to use the methods as easily. As Tyler stated, if you need a small service (micro service) that is familiar to laravel's syntax that speed is important (used in Envoyer's ping for server uptime) that you don't want to cascade through the full Laravel app. It's not necessarily for making a blog, but maybe a basic site that has static pages, or an API with like a max of 10 end points. Otherwise use Laravel.