Benyamin

Results 4 comments of Benyamin

yes I created a command extended Laravel Console Command

I need a token for admin in my commands and try to generate it by this code: ` public function handle() { auth('api')->tokenById(1); }`

I get token in normal action like this `Route::get('/', function () { return auth('api')->tokenById(1); });` My Env: `JWT_ALGO=RS256 JWT_PRIVATE_KEY=file://../storage/certs/jwt-rsa-2048-private.pem JWT_PUBLIC_KEY=file://../storage/certs/jwt-rsa-2048-public.pem` it could be possible can't get key with this path...

The problem is use relative path ` public function encode(array $payload) { $this->builder = null; $this->builder = $this->config->builder(); try { foreach ($payload as $key => $value) { $this->addClaim($key, $value); }...