create laravel passport token based on project

时间:2018-05-14 17:36:44

标签: laravel laravel-passport

The user can have more than one project, so I need to create a separate token for every project. if any operation trigger using API then I need to check they have access to that particular project or not.

1 个答案:

答案 0 :(得分:0)

我不认为创建单独的令牌是解决方案。您需要做的是使用范围。

https://laravel.com/docs/5.6/passport#token-scopes

请参阅此