Hello, after install this package, and add path in package config file, i am getting error
Call to undefined method Tymon\JWTAuth\Facades\JWTAuth::isDeferred()
how to fix this?
Where is this error error thrown from.. Can you paste a stack trace?
PHP Fatal error: Call to undefined method Tymon\JWTAuth\Facades\JWTAuth::isDeferred() in /var/www/my_proj/project/vendor/laravel/framework/src/Illuminate/Foundation/ProviderReposito
ry.php on line 119
PHP Stack trace:
PHP 1. {main}() /var/www/my_proj/project/artisan:0
PHP 2. Illuminate\Foundation\Console\Kernel->handle() /var/www/my_proj/project/artisan:36
PHP 3. Illuminate\Foundation\Console\Kernel->bootstrap() /var/www/my_proj/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:96
PHP 4. Illuminate\Foundation\Application->bootstrapWith() /var/www/my_proj/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:196
PHP 5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /var/www/my_proj/project/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:203
PHP 6. Illuminate\Foundation\Application->registerConfiguredProviders() /var/www/my_proj/project/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:
17
PHP 7. Illuminate\Foundation\ProviderRepository->load() /var/www/my_proj/project/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:507
PHP 8. Illuminate\Foundation\ProviderRepository->compileManifest() /var/www/my_proj/project/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:60
Could you try a composer dump-autoload or if that doesn't work, post your config/app.php specifically where you include the service provider and alias
composer dump-autoload doesn't help me
config/app.php
'providers' => [
default providers
......
Jlapp\Swaggervel\SwaggervelServiceProvider::class,
Zizaco\Entrust\EntrustServiceProvider::class,
Barryvdh\Cors\ServiceProvider::class,
Dingo\Api\Provider\LaravelServiceProvider::class,
Tymon\JWTAuth\Facades\JWTAuth::class,
]
'aliases' => [
default facades
.......
'Entrust' => Zizaco\Entrust\EntrustFacade::class,
'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
'JWTFactory'=> Tymon\JWTAuth\Facades\JWTFactory::class
]
You have added the facade to the providers array.
Replace that with the path to the service provider Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class
thanks :)
Most helpful comment
You have added the facade to the providers array.
Replace that with the path to the service provider
Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class