Questions tagged [lumen-5.2]

Lumen 5.2 uses the 5.2 family of Laravel components, as well as introduces some significant changes to Lumen's underlying philosophy and purpose. It has been released on 7th January 2016. Use it in addition to the [tag:lumen] tag in questions specific to Lumen 5.2.

Only Stateless APIs

Lumen 5.2 represents a shift on slimming Lumen to focus solely on serving stateless, JSON APIs. As such, sessions and views are no longer included with the framework. If you need access to these features, you should use the full Laravel framework. Upgrading your Lumen application to the full Laravel framework mainly involves copying your routes and classes over into a fresh installation of Laravel. Since Laravel and Lumen share many of the same components, your classes should not require any modification.

Authentication

Because sessions are no longer included with Lumen, authentication must be done statelessly using API tokens or headers. You have complete control over the authentication process in the new AuthServiceProvider.

Testing Helpers

Since sessions are no longer included with Lumen, all of the form interaction testing helpers have been removed. The testing helpers for JSON APIs remain.

From Lumen 5.2 Release Notes

92 questions
23
votes
5 answers

Why has the artisan serve command been removed from Lumen 5.2?

Please. Does anybody know why Lumen's team removed the command php artisan serve? That command was very helpful !.
vanhonit
  • 607
  • 1
  • 5
  • 14
15
votes
4 answers

Just installed Lumen and got NotFoundHttpException

I'm searching for a solution ... it's getting so frustrating. After a fresh installation of Lumen by Laravel, I simply can't access the "/" route. When I try to, it throws an error: NotFoundHttpException in RoutesRequests.php line 443: in…
robertsan
  • 1,591
  • 3
  • 14
  • 26
13
votes
3 answers

Command "serve" is not defined (Lumen-Laravel)

So, i try to install the lumen restful api. Based on tutorial, i have to "serve" on php artisan. The command be like: php artisan serve sample_api sample_api/public then it shows: Command "serve" not defined. Some say that serve command has been…
apapipip
  • 139
  • 1
  • 1
  • 3
8
votes
2 answers

Where to put business logic in Lumen?

I am developing my first API with Lumen. Normally I am using services for separating business logic or reused code from the controllers and share it with other controllers. How to do this with lumen? Where to put the services? I only see…
rakete
  • 2,953
  • 11
  • 54
  • 108
8
votes
1 answer

Post bodies ignored when making multiple post calls in laravel test

I've been running into problems writing my phpunit tests in lumen5.2 with laravel components. If I make multiple http calls to my API within a single test,the body I supply for subsequent calls is ignored in favor of the first body supplied to any…
Nathan Clow
  • 119
  • 6
8
votes
6 answers

How can I set Timezone in lumen 5.2?

I did not find any relevant information (only tricks) about how to set the default timezone in Lumen 5.2. Is there any clean way to do this?
rap-2-h
  • 30,204
  • 37
  • 167
  • 263
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
7
votes
3 answers

Target [Laravel\Socialite\Contracts\Factory] is not instantiable

I am using laravel lumen 5.2. Target [Laravel\Socialite\Contracts\Factory] is not instantiable. I came across this error when trying to get Laravel to login with Twitter using the Socialite package. Work already done: A) In config\app.php 1.…
Sannan
  • 83
  • 1
  • 5
6
votes
3 answers

Route Group in Lumen error Call to undefined method Laravel\Lumen\Application::group()

I have declared a route group in laravel/lumen like so: $app->group(['middleware' => 'auth'], function () use ($app) { $app->get('/details', 'UserController@details'); }); all contents of route file web.php are like…
Shakti Phartiyal
  • 6,156
  • 3
  • 25
  • 46
6
votes
0 answers

Multiple auth guards in Lumen framework

Please, can anybody explain how to implement multiple authentication guards in Lumen framework? Currently, I have two authenticatable models: Users and Clients. I'm using a custom implementation of JWT. A User has client_id and user_id fields in…
chimit
  • 548
  • 5
  • 20
6
votes
1 answer

Class 'Log' not found

I'm new to Lumen and Laravel, but I have to write a REST API using Lumen. I've set up a controller and I'm having a problem using the logger. I've followed the documentation: Lumen docs This is my controller…
Ruben
  • 5,043
  • 2
  • 25
  • 49
6
votes
2 answers

Laravel/lumen 5.2 generate migration tables from existing database

Is possible to generate migration schema from existing database in lumen/laravel 5.2 ? is there any package? I connect lumen to magento database, now I need to use eloquent. I dont have time to make migration model for every table.
Adnan
  • 7,825
  • 3
  • 23
  • 41
6
votes
2 answers

Lumen Authentication

Just can't get the Lumen authentication to work at all. I have a fresh install and trying to follow the docs here: https://lumen.laravel.com/docs/5.2/authentication I've Uncommented the AuthProvider line in the app.php file (along with everything…
Rob
  • 10,851
  • 21
  • 69
  • 109
5
votes
1 answer

Class path.config does not exist - Lumen 5.2

i have a little problem while adding GoogleMaps Package By alexpechkarev link : https://alexpechkarev.github.io/google-maps/ to lumen framework version 5.2 I added the ServiceProvider and Facade to my app.php…
Feelo Best
  • 91
  • 1
  • 3
5
votes
3 answers

Command "queue:failed-table" is not defined

For some reason, I'm unable to generate a failed jobs table in Lumen 5.2. I've consulted: The Lumen 5.2 Docs The Lumen 5.1 Docs The Laravel 5.2 Docs And the only one mentioned generator artisan queue:failed-table simply…
CmdrSharp
  • 1,085
  • 13
  • 30
1
2 3 4 5 6 7