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
2
votes
1 answer

Lumen custom authentication without Eloquent

After posting a question Lumen + Dingo + JWT is not instantiable while building about Lumen and Dingo here in SO I got a nice detailed answer on how to set up such a system. Within his setup there is a small authentication example, which uses…
Saif Bechan
  • 16,551
  • 23
  • 83
  • 125
2
votes
0 answers

LaravelValidator package

I use laravel validator with l5 repository and lumen 5.2 and ran in to 2 problems: I cant use unique as a rule. I get "presence verifier has not been set" I cant set custom rules. In the AppServiceProvider I…
user439781
  • 131
  • 12
2
votes
1 answer

Lumen route group doesn't work with named route

When I define a route inside a group in Lumen framwork it's working well with a direct closure but not with a controller name ; I always get a not found exception. //Working $app->group(['prefix' => 'admin'], function () use ($app) { …
Antoine Bellion
  • 136
  • 1
  • 9
2
votes
1 answer

Lumen installation error

I am trying to install lumen with composer so I used the command below composer create-project --prefer-dist laravel/lumen api But, for some reason I am getting this error before even doing anything, just visiting the public folder. Sorry, the page…
user4748790
2
votes
0 answers

Moving Laravel 5 application to Lumen - Class path.storage does not exist error

I'm trying to port my laravel 5 based api application to lumen however its giving me this error consistently and I'm at my wits end on how to solve it. This is the error stack: [Sun Mar 13 14:44:27.424346 2016] [:error] [pid 4683] [client…
Ali
  • 7,353
  • 20
  • 103
  • 161
2
votes
1 answer

Using Route Prefixes in Lumen

From the Lumen 5.2 docs: The prefix group attribute may be used to prefix each route in the group with a given URI. For example, you may want to prefix all route URIs within the group with admin: $app->group(['prefix' => 'admin'], function ()…
Joseph
  • 2,737
  • 1
  • 30
  • 56
2
votes
2 answers

Laravel Lumen 5.2 Cors Middleware not working

In Laravel Lumen 5.1 i am using this in my CorsMiddleware: public function handle($request, \Closure $next) { $response = $next($request); $response->header('Access-Control-Allow-Methods', 'HEAD, GET, POST, PUT, PATCH, DELETE'); …
Sephen
  • 1,111
  • 3
  • 16
  • 38
2
votes
2 answers

Configuring log rotate in Lumen 5.2

I tried to configure log rotation on Lumen but I'm stuck. I know how to do this with Laravel, but (one more time) I'm lost with Lumen. I tried to add this in app/bootstrap.php, because I read it…
rap-2-h
  • 30,204
  • 37
  • 167
  • 263
2
votes
0 answers

Lumen 5.0 Request Object Parameters Empty When Using CrawlerTrait::call()

When testing an API Endpoint with a call to CrawlerTrait::call() from a PHPUnit test. $this->call( 'GET', 'api/v3/user?page[size]=20' ); or $this->call( 'GET', 'api/v3/user, [ 'page' => [ 'size' => 20 ] ] ); With a…
64k
  • 239
  • 4
  • 12
2
votes
1 answer

Authentication in Lumen 5.2

In the AuthServiceProvider; Auth::viaRequest('api', function ($request) { if ($request->input('api_token')) { return User::where('api_token', $request->input('api_token'))->first(); } }); I can't seem to get this to work. GET…
moh_abk
  • 2,064
  • 7
  • 36
  • 65
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 Api, Android Post Response - Internal Server Error 500

My project has three part e.g. Lumen-5.8(API), Angular-8(web), Android(Mobile). The POST method is working in Angular but not working in Android.
Zahid
  • 470
  • 1
  • 3
  • 15
1
vote
0 answers

Lumen - Mono Log - Create Custom log file

Currently lumen is writing log to default (lumen.log) file in storage/log. I want to create custom log file.
Sreenath
  • 480
  • 2
  • 6
  • 17
1
vote
2 answers

i have two fields named as created_at and updated_at(timestamps) and i want to search between these dates in my where clause

i want to take input date as a parameter and search between the dates that are given in input. Theses are the timestamps() provided by laravel to create the two fields as created_at and upated_at.I want to search between these dates that are given…
ahmad izhar
  • 150
  • 1
  • 13
1
vote
1 answer

Own users table instead of oauth_clients with OAuth2-server for Lumen

I've successfully implemented an OAuth2-server in my Lumen API with this Tutorial. The tutorial uses the OAuth2 server for Laravel + Lumen. Unfortunately the documentation part of creating own grants isn't there yet. In my database there is the…
rakete
  • 2,953
  • 11
  • 54
  • 108