Use this tag for version specific questions about Lumen 5.3 - the official micro-framework by Laravel. When using this tag also include the more generic [lumen] tag.
Questions tagged [lumen-5.3]
32 questions
11
votes
1 answer
Views in Lumen 5.2+
I need to build a small widget, and was planning to use the Lumen for this because I need a quick response and I need components such as routing, translation, requests and views. the problem is noticed now that the views were discontinued after…

Miguel Borges
- 7,549
- 8
- 39
- 57
10
votes
2 answers
Lumen call to DB::connection() returns null even though select() is successful
I am using Lumen 5.3.1. $app->withFacades() and $app->withEloquent() have been uncommented in app.php. In web.php I run the following code:
$app->get('foo', function () {
return app('db')->select("SELECT * FROM foo");
return "Connected…

ebakunin
- 3,621
- 7
- 30
- 49
7
votes
2 answers
How to use multiple database in Lumen
We've using Lumen for building API's , Now we need to access multiple databases.
Currently using .env for database config but unable to found the way to multiple databases in .env
where we need to read 2nd connection ...

Govind Samrow
- 9,981
- 13
- 53
- 90
4
votes
4 answers
lumen throw 405 Method Not Allowed on get route
I am not able to understand why I am getting 405 below
$app->group(['prefix' => 'api/v1'], function($app)
{
$app->get('my','MyController@index');
$app->post('my','MyController@store');
});
post url is working as expected but when I defined…

user269867
- 3,266
- 9
- 45
- 65
3
votes
2 answers
How to Integrate Laravel Passport (Laravel 5.3) in Lumen 5.3 or generate Oauth2 token with library dusterio/lumen-passport?
I am trying to integrate Oauth2 authentication and found Taylor Otwell did a nice work for it with Laravel Passport. I am trying to integrate the same to create REST API, I google for integration and found a nice library for integration with link…

Prashant Barve
- 4,105
- 2
- 33
- 42
2
votes
0 answers
how to convert $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); to lumen
I am new to laravel and lumen, I am converting laravel code to lumen. Could you please help me to convert this make method to lumen?
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

Shyama
- 41
- 2
2
votes
0 answers
How to access contract references in lumen?
I'm new to Laravel and Lumen. But I have a laravel app to convert in to lumen. This is my index.php in laravel
$app = require_once DIR.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response =…

Shyama
- 41
- 2
2
votes
1 answer
middleware not working in laravel's lumen
I have just started learning lumen micro framework and having trouble as my middleware doesn't seem to work. here's my code.
//defined middleware in route
$app->get('/hello/{name}', ['middleware' => 'shield','uses' =>…

vijay varikol
- 81
- 3
- 10
1
vote
1 answer
how to ask for input in laravel's lumen command line?
How to ask for input and loop it until user inputs in command line using lumen ?
by the default I can create a custom command in the app/Console/Commands directory
here's my current code

sasori
- 5,249
- 16
- 86
- 138
1
vote
1 answer
lumen hash check return always false
I'm using Lumen to develop my API website, I came across this part where I hash password and check hash but it always returns false below is my attempt.
$hashed = $request->input('hash'); // e.g.…

Juliver Galleto
- 8,831
- 27
- 86
- 164
1
vote
1 answer
lumen passport login using username or email
Currently, I am working or lumen(Laravel's microframework), I have integrated passport in that application for user login.
I was stuck when the client told me that we need to log in with both, the username or email!
I have done that by changing…

Prateik Darji
- 2,297
- 1
- 13
- 29
1
vote
1 answer
SQLSTATE[42S22]: Column not found: 1054 Unknown column in lumen
im using jwt in lumen and everytime i try to create a new user i got error saying
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.id' in
'where clause' (SQL: select * from users where users.id is null limit
1)
eventhough i dont…

PinballWizard
- 131
- 1
- 2
- 12
1
vote
0 answers
Google_Client receipt validation: Class 'GuzzleHttp\Psr7\UriResolver' not found in \vendor\guzzlehttp\guzzle\src\Client.php line 147
I am using Lumen version Laravel Framework version Lumen (5.3.3) (Laravel Components 5.3.*). Following is my code. But throwing the exception:
Class 'GuzzleHttp\Psr7\UriResolver' not found in \vendor\guzzlehttp\guzzle\src\Client.php line…

Kiren S
- 3,037
- 7
- 41
- 69
1
vote
1 answer
Securing API in lumen
im new in lumen and im trying to secure my registration api by putting a code called Api-Token so only users that know the code can create a new user but everytime i try to create a new user i cant do it
here is what ive done so…

PinballWizard
- 131
- 1
- 2
- 12
1
vote
1 answer
Password Reset in Lumen 5.3
I'm trying to create a PasswordReset API in Lumen 5.3.
I've the same setup from a default Laravel 5.3 app.
$app->post('/password/email', 'PasswordController@postEmail');
$app->post('/password/reset/{token}', 'PasswordController@postReset');
and in…

user1012181
- 8,648
- 10
- 64
- 106