1

I am getting the following errors for any of the php artisan commands. I am using laravel/dingo package.

Did the following steps which resulted in the error

    Loading composer repositories with package information
Updating dependencies (including require-dev)                        
  - Removing rap2hpoutre/laravel-log-viewer (v0.6.1)
  - Removing dingo/blueprint (v0.1.5)
  - Installing dingo/blueprint (v0.1.6)
    Downloading: 100%         

  - Removing dingo/api (dev-master 8cd1a6c)
  - Installing dingo/api (v1.0.0-beta3)
    Downloading: 100%         

  - Removing cartalyst/support (v1.1.2)
  - Installing cartalyst/support (v1.2.0)
    Downloading: 100%         

Writing lock file
Generating autoload files
> php artisan optimize

composer update
> php artisan clear-compiled


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

Then onwards any php artisan commands are showing "The token could not be parsed from the request " error

What would have went wrong. So much confused :(

Ajeesh
  • 5,650
  • 8
  • 30
  • 52

1 Answers1

0

I'm getting the same error - it's because I am using a constructor in my UserController, I have a getAuthenticatedUser method that calls: $user = JWTAuth::parseToken()->authenticate()

Then in my constructor I set $this->user = $this->getAuthenticatedUser(); -- that makes artisan throw a fit. I have not figured out a work around just yet other than removing the constructor, if anyone has a better suggestion, I'd like to know as well.

PatrickCurl
  • 996
  • 1
  • 7
  • 8