Skip to content

Avoid accessing Token class directly  #95

@lucasctd

Description

@lucasctd

In AccessTokenController class you access the Token model directly (see below). You should avoid doing this since Laravel provides the Passport::token() where you can get the instance of the Token model.
image
So, instead of doing like above you should:

$query = Passport::token()->where('user_id', $token->user_id)->where('client_id', $token->client_id);
It's very important since, like in my case, people may be using a different implementation of the model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions