Questions tagged [lumen]

Lumen is a "micro-framework" built on top of Laravel's components, and is the official micro-framework of Laravel. Lumen is targeted at microservices--small, loosely-coupled components that usually support and enhance a core project.

Lumen is the perfect solution for building based micro-services and blazing fast APIs. In fact, it's one of the fastest micro-frameworks available.

Feature Overview

  • Templating
  • Caching
  • Command Scheduler
  • Controllers
  • Eloquent ORM
  • Error Handling
  • Database Abstraction
  • Dependency Injection
  • Logging
  • Queued Jobs

Documentation

Other notable tags

Community

Other Useful Resources

2610 questions
0
votes
1 answer

SteamedResponse not working in lumen on other server

I am using Lumen for a set of APIs. using streamedresponse built in library of symphony. use Symfony\Component\HttpFoundation\StreamedResponse; protected function getFileResponseHeaders($filename) { return [ 'Cache-Control' =>…
Shahid Rafiq
  • 669
  • 1
  • 12
  • 27
0
votes
3 answers

VueJs image not displayed

I have I think a small issue but I can't resolve it since more than 2 hours ... I have a VueJs application and I'm trying to display an image that came from an API. In my register.html I have that code :
Fizik26
  • 753
  • 2
  • 10
  • 25
0
votes
1 answer

filtered date doesn't show after edit the column date format - Laravel Yajra Datatable

I use laravel 8 + lumen rest api server and little bit confused because when i consume timestamp and parse it to localize format date on laravel side, also separated the display and timestamp for the js side datatables, the editColumn()it make the…
Annug Dev
  • 21
  • 5
0
votes
0 answers

Call to a member function beginTransaction() on null

I am getting Call to a member function beginTransaction() on null when importing data from "Maatwebsite\Excel\Excel" using lumen and MongoDB.
0
votes
0 answers

Lumen routing bug: is_object($value) && is_callable($value)

Rather than using the string "@" format for specifying callbacks in routes $router->get('status', 'ApiController@status'); I'm trying to create a route in lumen using the array syntax for the callback $router->get('status', [ApiController::class,…
0
votes
1 answer

Lumen 5.8 enable cors

I'm trying to enable CORS in Lumen 5.8 backend api system, called by a React Js frontend. Here what I did: I've created CatchAllOptionsRequestsProvider.php to App\Providers folder. use Illuminate\Support\ServiceProvider; /** * If the incoming…
0
votes
1 answer

Lumen - pagination and result editing

I'm new to Lumen and trying to make a simple REST API app. I want one of the endpoints to be able to display all records from a "storeItems" table but add a field to each record with its' categories and paginate them. So at the moment I have the…
Bostjan
  • 1,397
  • 3
  • 21
  • 36
0
votes
1 answer

Heroku + Lumen SoapClient

I'm developing an app with Lumen Framework which needs to use SoapClient to communicate with Magaya Software. My app is hosted in Heroku, and has been worked well for few months. 3 days ago I realized that quotations transactions with magaya were…
0
votes
6 answers

Response JSON error - Type is not supported when using Eloquent

EDIT: I outputted the array and @apokryfos had mentioned something about resources not being able to be serialized. Here is how some debug output looks: (Removed some information that is more sensitive) Stream in Timestamp It is my timestamp causing…
mar fo
  • 33
  • 6
0
votes
1 answer

How bind named parameter in raw sql WHERE IN [LUMEN/LARAVEL]

Lumen has DB facade with select method $results = DB::select('select * from users where id = :id', ['id' => 1]); But this dont work in WHERE IN case. DB::connection('db')->selectOne("many lines of sql WHERE my_id IN (:my_id) ", ["my_id" =>…
Alma Z
  • 244
  • 2
  • 10
0
votes
0 answers

Lumen: Cache vs Database

I've got 110 records (3.3 kB) in my database, they will never change, and I'm calling them quite frequently during the user journey. For this reason, I thought to store them into a cache system (file), but, looking at the network performance, the…
Ale
  • 117
  • 1
  • 13
0
votes
1 answer

How can you create wildcard routes on Lumen?

Let's say I have a controller called TeamsController. Controller has following method, that returns all teams user has access to. public function findAll(Request $request): JsonResponse { //... } Then I have bunch of other controllers with the…
Firze
  • 3,939
  • 6
  • 48
  • 61
0
votes
1 answer

Where do I put "extra" default fields for a Laravel model?

This question is about the "correct" design pattern, not about functional code. I want to adhere to best-practices and use the right feature in Laravel. I have a model called Order which contains users' product orders. Order has several columns,…
mydoglixu
  • 934
  • 1
  • 7
  • 25
0
votes
1 answer

How to optimize and clean these loops?

I'm writing a project with Laravel.i have a loop with a lot of condition like this: foreach ($transactionsGroupBys as $transactionsGroupBy) { if ($this->checkExistSettlement($transactionsGroupBy, Carbon::today())) { …
0
votes
1 answer

what is best practice for decimal validate in laravel?

I have migration like this: $table->decimal('amount_settle', 15, 2); how can validate amount_settle in controller.
mohammad
  • 95
  • 7
1 2 3
99
100