tymondesigns / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
https://jwt-auth.com
MIT License
11.31k stars 1.54k forks source link

vendor:publish not copy anything. (Estable version and dev.master) #1489

Open abkrim opened 6 years ago

abkrim commented 6 years ago

Subject of the issue

Describe your issue here.

➜  jwt-auth a vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"
Publishing complete.
➜  jwt-auth ls -lisah config/jwt.php
ls: config/jwt.php: No such file or directory

Your environment

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 5.6.3
Package version dev-master 614ee34 & 0.5.12
PHP version 7.1.4

Steps to reproduce

Fresh install laravel Composer install package Run command

Expected behaviour

File for config

Actual behaviour

Tell us what happens instead

Notes

If add values to config/app.php, work. ¿Package not work with auot-discover?

lCHECHOl commented 6 years ago

according to other problems that I have seen is not supported for laravel 5.6 but you can try the following, it worked for me in laravel 5.5

Add "tymon/jwt-auth": "dev-develop" to your require in composer.json then run composer update

but first notice that in the file boostrap / cache / services.php or boostrap / cache / config.php you do not have the following provider:

'Tymon \ JWTAuth \ Providers \ JWTAuthServiceProvider'

if you have it in cache, delete that line and proceed with the composer update, now what you should do is in config / app.php in the providers:

Tymon \ JWTAuth \ Providers \ LaravelServiceProvider :: class,

and in the aliases

'JWTAuth' => Tymon \ JWTAuth \ Facades \ JWTAuth :: class, 'JWTFactory' => Tymon \ JWTAuth \ Facades \ JWTFactory :: class

then

php artisan vendor: publish --provider = "Tymon \ JWTAuth \ Providers \ LaravelServiceProvider"

and then, run:

php artisan jwt: secret

it happened to me that if I did not put the providers and the aliases, the command would not work

php artisan vendor: publish --provider = "Tymon \ JWTAuth \ Providers \ LaravelServiceProvider"

colorful-bubbles commented 6 years ago

For Laravel 5.6 you will need version 1.0.0 of jwt-auth. After you update the package to the higher version commands you tried to run should work fine.