laravelio/laravel.io

API token created but the token is not showing

ilasisi opened this issue · 0 comments

image

I noticed the logic was created as a job and plainTextToken was called like;

$token = $user->tokens()->where('name', $request->name())->first();
$token->plainTextToken;

Which would definitely returned null as plainTextToken is not directly available on the model but returned when called createToken().

So I raised a PR to fixed this, you can find it here #960.

@driesvints