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
197
votes
8 answers

Differences and Similarities Between Lumen and Laravel

I read the documentation and it seems Lumen is Laravel with less features. I must be missing something. I am looking for a comparison table of the components and features of both Laravel and Lumen. Does anyone know the differences?
Ranjeet Karki
  • 2,627
  • 4
  • 19
  • 30
123
votes
13 answers

Lumen: get URL parameter in a Blade view

I'm trying to get a url parameter from a view file. I have this url: http://locahost:8000/example?a=10 and a view file named example.blade.php. From the controller I can get the parameter a with $request->input('a'). Is there a way to get such…
Andrea
  • 15,900
  • 18
  • 65
  • 84
98
votes
17 answers

Change Timezone in Lumen or Laravel 5

I am using Lumen framework. How can I change Timezone to Europe/Paris CEST? I added a variable in my .env file: APP_TIMEZONE=Europe/Paris But this doesn't work. What is the right way to update the timezone?
StormTrooper
  • 1,731
  • 4
  • 23
  • 37
88
votes
15 answers

Lumen Micro Framework => php artisan key:generate

I'm trying out the PHP micro Framework Lumen (from Laravel). One of my first steps was to look into the .env.example file and make a copy of it to have my .env file. There is a variable APP_KEY just like there is in Laravel. Now I tried out the…
Thomas Venturini
  • 3,500
  • 4
  • 34
  • 43
79
votes
14 answers

How to change public folder to public_html in Laravel

I'm using a shared hosting which uses cPanel as its control panel and within the cPanel public_html is the default root directory, because of this I can't get my Laravel application work properly. Is there any way to make Laravel use public_html…
Ravexina
  • 2,406
  • 2
  • 25
  • 41
50
votes
12 answers

Laravel Lumen Memcached not found

Ok, I just started with Lumen and I'm trying to use the Auth, but a call to either Auth::check or any other function of Auth.. leads to the below Error Fatal error: Class 'Memcached' not found in vendor\illuminate\cache\MemcachedConnector.php on…
Paul Okeke
  • 1,384
  • 1
  • 13
  • 19
48
votes
2 answers

NotFoundHttpException with Lumen

I've just installed Lumen on Windows and unfortunately I'm getting the following error: NotFoundHttpException in Application.php line 1093: in Application.php line 1093 at Application->handleDispatcherResponse(array('0')) in Application.php line…
Timo Güntner
  • 2,863
  • 4
  • 17
  • 24
46
votes
7 answers

PHP Lumen Call to a member function connection() on null

I'm receiving this error when trying to use an Eloquent Model in Lumen. Call to a member function connection() on null Controller func: /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ …
bi4nchi
  • 519
  • 1
  • 4
  • 7
46
votes
6 answers

Lumen (Laravel) Eloquent php artisan make:model not defined

I use Lumen 1.0 for an API project. I have already enable Eloquent by uncomment the following line in bootstrap/app.php file : $app->withEloquent(); But when I want to create my first model with migration it fails : php artisan make:model Book…
Samuel Dauzon
  • 10,744
  • 13
  • 61
  • 94
35
votes
3 answers

Where to register Facades & Service Providers in Lumen

I Am looking for where to add the facade below in Lumen. 'JWTAuth' => 'Tymon\JWTAuth\Facades\JWTAuth' EDITED Also where to register service provider in bootstrap\app.php $app->register('Tymon\JWTAuth\Providers\JWTAuthServiceProvider'); Please…
Emeka Mbah
  • 16,745
  • 10
  • 77
  • 96
34
votes
3 answers

Lumen make:command

I'm trying to execute code within my Lumen install via the command line. In full Laravel , I've read that you can use commands to achieve this via "make:command", but Lumen does not seem to support this command. Is there anyway to enable this…
trajan
  • 1,093
  • 2
  • 12
  • 15
31
votes
2 answers

Remove cache keys by pattern/wildcard

I'm building a REST API with Lumen and want to cache some of the routes with Redis. E.g. for the route /users/123/items I use: $items = Cache::remember('users:123:items', 60, function () { // Get data from database and return }); When a change is…
j3491
  • 475
  • 1
  • 5
  • 11
30
votes
2 answers

Events vs Observers in laravel

I'm really confused with events and observers. because both are doing same things. what are the differences b/w events and observers? Thanks in advance.
Suresh Kumar
  • 513
  • 1
  • 5
  • 15
27
votes
5 answers

Laravel 5 / Lumen Request Header?

So I am not really sure how to go about this I have tried a few things and I will list one below however what I am trying to do is store information sent in a http request in a PHP variable. Here is a view from Chrome Postman of me sending the…
kevingilbert100
  • 1,303
  • 4
  • 22
  • 38
25
votes
4 answers

Laravel Lumen Ensure JSON response

I am new to Laravel and to Lumen. I want to ensure I am always getting only a JSON object as output. How can I do this in Lumen? I can get a JSON response using response()->json($response);. But when an error happens, API giving me text/html errors.…
John Fonseka
  • 793
  • 1
  • 8
  • 15
1
2 3
99 100