laravel passport: create personal access token without linked user ID

raw

code.php

1
2
3
4
$token = \Illuminate\Container\Container::getInstance()
    ->make(\Laravel\Passport\PersonalAccessTokenFactory::class)
    ->make(null, 'My token name', ['myscope'])
    ->accessToken;
Christian Weiske Christian Weiske
owner

History