Skip to content

Does laravel-mongodb has laravel sanctum support? #2233

@rhasani

Description

@rhasani

Hello, I am using laravel sanctum with mongodb.

but when I am runnung:
$authToken = $user->createToken('auth-token')->plainTextToken();

I am getting the following error:
"message": "Call to a member function prepare() on null", "exception": "Error", "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php", "line": 465, "trace": [ { "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php", "line": 671, "function": "Illuminate\\Database\\{closure}", "class": "Illuminate\\Database\\Connection", "type": "->" },

and I think this is because of the lack of pre-built columns of personal_access_token table due to using mongodb.
is there any solution make it work with laravel sanctum?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions