Jwt-auth: vendor:publish not copy anything. (Estable version and dev.master)

Created on 20 Feb 2018  Â·  2Comments  Â·  Source: tymondesigns/jwt-auth

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?

Most helpful comment

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"

All 2 comments

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"

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

heroghost picture heroghost  Â·  3Comments

shah-newaz picture shah-newaz  Â·  3Comments

johncloud200 picture johncloud200  Â·  3Comments

loic-lopez picture loic-lopez  Â·  3Comments

hfalucas picture hfalucas  Â·  3Comments