Hi there,
I am trying to work with jwt-auth for my Laravel5.4-AngularJS application.
Steps i have done till now to add jwt-auth:
1- I have added: "tymon/jwt-auth": "0.5.*" to the'require' section in composer.json .
2- Update composer:composer update
3- Edit config/app.php by adding:
' Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,' to 'providers'array
and
'JWTAuth' => Tymon\JWTAuthFacades\JWTAuth::class,
'JWTFactory' => Tymon\JWTAuthFacades\JWTFactory::class,
to'aliases' array.
4- From CLI: php artisan vendor:publish --provider="Tymon\JWTAuthProviders\JWTAuthServiceProvider"
and the return was "Publishing complete."
but in my config folder it doesn't generate the jwt.php!!
I have solved the problem :)
In fact i did not work with other version of Laravel, but for Laravel 5.4 before typing in th command: php artisan vendor:publish --provider="Tymon\JWTAuthProviders\JWTAuthServiceProvider"
I have to type the same command without the provider parameter first : php artisan vendor:publish
And that solved my problem and now jwt.php is generated in the config folder :).
Thanks
thank you... <3
I realize that I am late to this party but I just wanted to say that you can accomplish the same thing by specifying the provider but the reason it didn't work for you is because the provider name changed.
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"
It always blows my mind when really simple install instructions flat out don't work. I don't get it.
Hi there,
I am trying to work with jwt-auth for my Laravel5.4-AngularJS application.
Steps i have done till now to add jwt-auth:
1- I have added:"tymon/jwt-auth": "0.5.*"to the'require'section in composer.json .
2- Update composer:composer update
3- Edit config/app.php by adding:
'Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,' to'providers'array
and'JWTAuth' => Tymon\JWTAuthFacades\JWTAuth::class, 'JWTFactory' => Tymon\JWTAuthFacades\JWTFactory::class,to
'aliases'array.
4- From CLI:php artisan vendor:publish --provider="Tymon\JWTAuthProviders\JWTAuthServiceProvider"
and the return was "Publishing complete."
but in my config folder it doesn't generate the jwt.php!!
I have solved the problem :)
In fact i did not work with other version of Laravel, but for Laravel 5.4 before typing in th command:php artisan vendor:publish --provider="Tymon\JWTAuthProviders\JWTAuthServiceProvider"
I have to type the same command without the provider parameter first :php artisan vendor:publish
And that solved my problem and now jwt.php is generated in the config folder :).
steps not clear sis can you please clearly mention the steps again please..
Most helpful comment
I have solved the problem :)
In fact i did not work with other version of Laravel, but for Laravel 5.4 before typing in th command:
php artisan vendor:publish --provider="Tymon\JWTAuthProviders\JWTAuthServiceProvider"I have to type the same command without the provider parameter first :
php artisan vendor:publishAnd that solved my problem and now jwt.php is generated in the config folder :).