Where to register Facades & Service Providers in Lumen?

0 votes

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 assist.

Apr 6 in Laravel by kartik
• 11,290 points
90 views

1 answer to this question.

0 votes

Hello,

To register a facade with an alias, go to bootstrap/app.php and uncomment:

$app->withFacades();

... it instructs the framework to start with facades. To add your facades, just put them in an array and pass the array as a second argument, while setting the first argument to true, as follows:

$app->withFacades(true, ['Tymon\JWTAuth\Facades\JWTAuth' => 'JWTAuth']);

To register a service provider, in the same file, scroll down to a relevant comment section and add the following line:

$app->register(Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class);

Thank you!!

answered Apr 6 by Niroj
• 22,790 points

Related Questions In Laravel

0 votes
1 answer

How to pass URL param in Laravel?

Hello, First you have to go to routes ...READ MORE

answered Mar 18 in Laravel by Niroj
• 22,790 points
108 views
0 votes
1 answer

How to pass data through URL and access through controller in Laravel?

Hello, You can  first refer how to  Create controller through ...READ MORE

answered Mar 18 in Laravel by Niroj
• 22,790 points
224 views
0 votes
1 answer

What is middleware? How can we register middeleware in Laravel?

Middleware acts as a bridge between a ...READ MORE

answered Mar 18 in Laravel by Niroj
• 22,790 points
101 views
0 votes
1 answer

How to identify wheather the request is HTTP GET or HTTP POST in Laravel?

Hey, In order to identify the type of ...READ MORE

answered Mar 19 in Laravel by Niroj
• 22,790 points
40 views
0 votes
1 answer

How can we Create Multiple Where Clause Query Using Laravel Eloquent?

Hii, You can use Conditions using Array: $users = User::where([ ...READ MORE

answered Mar 30 in Laravel by Niroj
• 22,790 points
196 views
0 votes
1 answer

How to send email using php?

Hello @kartik 1.) Download PHPMailer, open the zip file ...READ MORE

answered Apr 1 in PHP by Niroj
• 22,790 points
24 views
0 votes
1 answer

How can I update NodeJS and NPM to the next versions?

Hello @kartik, First check your NPM version npm -v 1).Update ...READ MORE

answered May 5 in Java-Script by Niroj
• 22,790 points
27 views
0 votes
1 answer

Switch statement for string matching in JavaScript

Hello @kartik, Just use the location.host property switch (location.host) ...READ MORE

answered 9 hours ago in Java-Script by Niroj
• 22,790 points
9 views
0 votes
1 answer

Explain Extending Bindings in Laravel? And where to extend the bind in laravel?

Hii,  The extend method allows the modification of ...READ MORE

answered Mar 26 in Laravel by Niroj
• 22,790 points
32 views
0 votes
1 answer

How do you register service providers?

Hey,  It is one of the most easy ...READ MORE

answered Mar 26 in Laravel by Niroj
• 22,790 points
69 views