简体   繁体   English

PHP Laravel 5.7 Tymon / jwt-auth未安装

[英]PHP Laravel 5.7 Tymon/jwt-auth Not Installing

Trying to install the Tymon/jwt-auth package and work with it, following the directions on the site: https://jwt-auth.readthedocs.io/en/develop/laravel-installation/ Doesn't seem like the publish configuration seems to do anything, I'm not seeing a config/jwt.php file, and the command php artisan jwt:secret doesn't do anything useful, saying that there are no commands defined in the "jwt" namespace. 按照网站上的说明尝试安装Tymon / jwt-auth软件包并使用它: https : //jwt-auth.readthedocs.io/en/develop/laravel-installation/似乎不像发布配置似乎没有任何作用,我没有看到config / jwt.php文件,并且php artisan jwt:secret命令没有做任何有用的事情,表示“ jwt”命名空间中没有定义任何命令。

Does anyone have any info on getting JWT working on Laravel 5.7? 是否有人有任何有关让JWT在Laravel 5.7上运行的信息?

Verified that it is in the composer.json: 验证它在composer.json中:

    "require": {
    "php": "^7.1.3",
    "fideloper/proxy": "^4.0",
    "laravel/framework": "5.7.*",
    "laravel/tinker": "^1.0",
    "tymon/jwt-auth": "^0.5.12"
},

It would be nice to get this released soon you can just using this 尽快发布此信息将非常不错,您可以使用它

"tymon/jwt-auth": "dev-develop"

That worked for my project 那对我的项目有用

Go to composer.json . 转到composer.json Add this to require: "tymon/jwt-auth": "^1.0.0" . 将此添加到要求: "tymon/jwt-auth": "^1.0.0" Then run php composer update . 然后运行php composer update The version of jwt 0.5 is not suported by carbon 2.0. jwt 0.5的版本不支持Carbon 2.0。 This worked for me with laravel 5.8. 这对于laravel 5.8对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM