0

このチュートリアル https://tutsforweb.com/restful-api-in-laravel-56-using-jwt-authentication/ に従いましたが、正常に動作していますが、実行しようとすると

php職人ルート:リスト

このエラーが発生します。

  Tymon\JWTAuth\Exceptions\JWTException  : The token could not be parsed from the request

  at F:\My_Projects\Laravel\api-laravel-jwt\vendor\tymon\jwt-auth\src\JWT.php:185
    181|      */
    182|     public function parseToken()
    183|     {
    184|         if (! $token = $this->parser->parseToken()) {
  > 185|             throw new JWTException('The token could not be parsed from the request');
    186|         }
    187|
    188|         return $this->setToken($token);
    189|     }

  Exception trace:

  1   Tymon\JWTAuth\JWT::parseToken()
      F:\My_Projects\Laravel\api-laravel-jwt\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:223

  2   Illuminate\Support\Facades\Facade::__callStatic("parseToken", [])
      F:\My_Projects\Laravel\api-laravel-jwt\app\Http\Controllers\ProductController.php:14

  Please use the argument -v to see more details.

私はそれを回避しようとしてきましたが、成功できませんでした。

これは私のコードを含む github リポジトリです:-

https://github.com/Imohamedgabr/laravel-5.7-jwt-starter

4

1 に答える 1