$role = Auth::user()->roleOnCurrentTeam();
$roles = Spark::roles();
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I want to use laravel permissions, I can assign role on the register
Spark::createUsersWith(function ($request) {
...
$user->assignRole('owner');
});
but how can I get the current role associated with a logged in user in front-end, and also I need to list all the roles available from roles table?
When I check in dev console user variable there is no roles property. and global spark.roles is also an empty array.
Please or to participate in this conversation.