I try to install jwt-auth to my laravel 5.8 ass as written here https://github.com/tymondesigns/jwt-auth/wiki/Installation
But I encountered versions compatibility error and after search I found this
tymon/jwt-auth package show error in laravel 5.8
and with command
composer require tymon/jwt-auth:dev-develop
I installed tymon/jwt-auth successfully, but trying to write config options in config/app.php:
'providers' => [
...
'aliases' => [
...
'Tymon\JWTAuth\Providers\JWTAuthServiceProvider'
but next instructions
Also included is a Facade for the PayloadFactory. This gives you finer control over the payloads you create if you require it 'JWTFactory' => 'Tymon\JWTAuth\Facades\JWTFactory'
I did not find in which file I have to write it, if I really need it?
With next command I got error :
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\JWTAuthServiceProvider"
In ProviderRepository.php line 208:
Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' not found
Searching I net I found some decisions for different versions, but I failed to fix this error...
How to fix it? Is this issue with JWTFactory ?
My composer.json :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.1.3",
"barryvdh/laravel-cors": "^0.11.4",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.8.9",
"laravel/passport": "^7.0",
"laravel/tinker": "^1.0",
"spatie/laravel-activitylog": "^3.9",
"tymon/jwt-auth": "dev-develop",
"wboyz/laravel-enum": "^0.2.1"
},
"require-dev": {
"facade/ignition": "^1.4",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire