Closed amittrigma closed 6 years ago
This sounds like your User
model is missing the HasApiTokens
trait.
You can find more information here https://laravel.com/docs/5.5/passport#installation.
<?php
namespace App;
use Laravel\Passport\HasApiTokens;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use HasApiTokens, Notifiable;
}
Hopefully this will fix your issue
@amittrigma i've added a new User class in this commit and published a new release https://github.com/StevePorter92/laravel-mongodb-passport/commit/59c36ae8862f25936880835b1485f1ed9d115456.
If update and have your User
class extend StevePorter92\Mongodb\Auth\User
, this should make your problems go away :)
Error: Call to undefined method Jenssegers\Mongodb\Query\Builder::createToken()