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
4
votes
2 answers

Mixed content issue- Content must be served as HTTPS || Lumen || Swagger API

Mixed Content: The page at 'https://api.xyz.com/api/documentation' was loaded over HTTPS, but requested an insecure stylesheet 'http://api.xyz.com/swagger-ui-assets/swagger-ui.css?v=26ec363936a21921c9fec290e551e3eb'. This request has been blocked;…
Radhe Shyam sharma
  • 900
  • 15
  • 21
3
votes
0 answers

Lumen: How to make Auth login for user using middleware?

I'm trying to pass a username and password from a form into a controller, check if that user exists (users database table), and then redirect to an authenticated page where only users that are logged in can see their username. In my…
LatentDenis
  • 2,839
  • 12
  • 48
  • 99
3
votes
2 answers

How can I use Illuminate\Session\Middleware\StartSession::class on lumen 5.2

I got this Error: BindingResolutionException in Container.php line 839: Unresolvable dependency resolving [Parameter #0 [ $app ]] in class Illuminate\Support\Manager bootstrap/app.php : $app->middleware([ …
shahrokh
  • 142
  • 2
  • 13
3
votes
1 answer

Lumen testing. UploadedFile validation failed

In my controller's action to upload file I have a validation rule['file' => 'image']; I create a test UploadedFile instace like this: $uploadedFile = new UploadedFile(base_path(self::UPLOAD_PATH), $name, $mimeType, null, null, true); As you can see,…
3
votes
1 answer

Lumen + Dingo + JWT is not instantiable while building

I am trying to get a basic working foundation for a Lumen + Dingo Rest API, but I am not able to figure out how to peace is all together. Lumen is working fine, but when I try to add Dingo I get all sorts of errors. From the Dingo documentation I…
Saif Bechan
  • 16,551
  • 23
  • 83
  • 125
3
votes
2 answers

Error downloading Lumen via Composer

I just updated my Laravel version to 5.2 as well as updating my composer. Then when I tried to install Lumen via composer, I am getting an error of: Your requirements could not be resolved to an installable set of packages. Problem 1 -…
basagabi
  • 4,900
  • 6
  • 38
  • 84
2
votes
1 answer

PHP error pushes Job in Delayed queue while --tries=0 is used

I am using supervisor to run jobs on my lumen 5.2 setup. My supervisor conf. look like this [program:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /var/www/app/artisan queue:work -- queue=server_level,app_level…
Saqib
  • 2,470
  • 3
  • 19
  • 32
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
2
votes
2 answers

Lumen's url() function performing strangely

I recently did a fresh install of Lumen framework and started building a site from it. Yes I know lumen is designed only for APIs but please help me out with this. I have placed all my views inside /resources/views and my templates inside…
Himanshu Singh
  • 970
  • 2
  • 6
  • 18
2
votes
2 answers

how to refresh token in jwt using lumen?

I using lumen(5.2) framework and jwt(1.0). I get a token but i can't refresh it ,because the system tell me "The token has been blacklisted". I don't know how solved it. could you please help me. Forgive me, My English isn't very good, There may be…
Du L.P
  • 31
  • 1
  • 3
2
votes
1 answer

How to establish the connection to database in PHP Laravel Lumen?

I'm trying to run a Lumen based query through localhost. I don't know how to properly call the right database name. EDIT: The reason I'm getting the error below is because of the name of the db name in my .env file in my project. The line…
LatentDenis
  • 2,839
  • 12
  • 48
  • 99
2
votes
1 answer

Lumen database [] not configured after doing necessary steps

I have read and tried to do the steps from these links, but my second database still will not configure. Lumen - Create database connection at runtime Lumen Database [xxx] not configured What am I doing wrong? Is there something I've missed…
M. Datu
  • 33
  • 1
  • 5
2
votes
1 answer

Command "make:seeder" is not defined in Lumen 5.2

I'm developing my first Lumen project and I try to create a seed class for my database. I'm trying to run the next command: php artisan make:seeder UsersTableSeeder But I always get this…
pableiros
  • 14,932
  • 12
  • 99
  • 105
2
votes
1 answer

How installing blade template in Microframework Lumen?

I have this version: Lumen (5.2.6) (Laravel Components 5.2.*)
Alex Quintero
  • 1,160
  • 10
  • 21
2
votes
1 answer

Laravel advanced where not working in Lumen

I use Laravel advanced wheres in Lumen for a query in MongoDB and i use jenssegers/laravel-mongodb package for Lumen and my query is : $time_5_min_ago = Carbon::now()->subMinute(5); $time_10_min_ago = Carbon::now()->subMinute(10); $time_15_min_ago =…
bitcodr
  • 1,395
  • 5
  • 21
  • 44