Is there a way to add custom data into the payload in Laravel/Passport?
When im using tymondesigns/jwt-auth, You usually just add this in the model:
public function getJWTCustomClaims()
{
return [
'id' => $this->id,
'name' => $this->name,
'role' => $this->role,
];
}
But how do you customize it when using Lavel-passport? I just want the id, name, and role to be included in the payload. Just like the image/link below(last 3 items on the payload):