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, 2020 in Laravel by kartik
• 37,530 points
2,127 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, 2020 by Niroj
• 82,820 points

Related Questions In Laravel

0 votes
0 answers

how to create exception in react router using Route::get('/{path?}', 'IndexController@index')->name('index') ->where('path', '.*');

I am using react routers within Laravel ...READ MORE

Nov 15, 2020 in Laravel by datso
• 120 points

recategorized Nov 16, 2020 by Niroj 99 views
0 votes
1 answer

How to pass URL param in Laravel?

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

answered Mar 18, 2020 in Laravel by Niroj
• 82,820 points
3,411 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, 2020 in Laravel by Niroj
• 82,820 points
7,923 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, 2020 in Laravel by Niroj
• 82,820 points
825 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, 2020 in Laravel by Niroj
• 82,820 points
9,511 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, 2020 in PHP by Niroj
• 82,820 points
327 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, 2020 in Java-Script by Niroj
• 82,820 points
224 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 Jun 2, 2020 in Java-Script by Niroj
• 82,820 points
147 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, 2020 in Laravel by Niroj
• 82,820 points
412 views
0 votes
1 answer

How do you register service providers?

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

answered Mar 26, 2020 in Laravel by Niroj
• 82,820 points
169 views