Does laravel-mongodb has laravel sanctum support? #2242
-
Hello, I am using laravel sanctum with mongodb. but when I am runnung: I am getting the following error: and I think this is because of the lack of pre-built columns of personal_access_token table due to using mongodb. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
in File vendor/laravel/sanctum/src/PersonalAccessToken.php Replace and write and in User Model don't forget to replace use Illuminate\Foundation\Auth\User as Authenticatable; and write |
Beta Was this translation helpful? Give feedback.
-
Create a custom PersonalAccessToken Model class PersonalAccessToken extends Model implements HasAbilities
}` then use it in your appService provider `use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider
}` |
Beta Was this translation helpful? Give feedback.
Create a custom PersonalAccessToken Model
`use Laravel\Sanctum\Contracts\HasAbilities;
use Jenssegers\Mongodb\Eloquent\Model;
class PersonalAccessToken extends Model implements HasAbilities
{