Commit 01853adf authored by Viral Solani's avatar Viral Solani

Add User's permission in Custom claims

parent 597c4baa
......@@ -92,8 +92,11 @@ class User extends Authenticatable implements JWTSubject
'email' => $this->email,
'picture' => $this->getPicture(),
'confirmed' => $this->confirmed,
'registered_at' => $this->created_at->toIso8601String(),
'last_updated_at' => $this->updated_at->toIso8601String(),
'role' => optional($this->roles()->first())->name,
'permissions' => $this->permissions()->get(),
'status' => $this->status,
'created_at' => $this->created_at->toIso8601String(),
'updated_at' => $this->updated_at->toIso8601String(),
];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment