MattPurland
Setting team_id in session when authenticating
Hi all, filament newbie here. I'm looking into using filament for a new project, using Spatie laravel-permission via the "Spatie Roles Permissions" filament plugin. I'm still figuring it out and whether it's a good fit for what I need (I think it will be). But I'm hitting some (basic) walls.
As per the following:
https://spatie.be/docs/laravel-permission/v6/basic-usage/teams-permissions#content-working-with-teams-permissions
"After implementing a solution for selecting a team on the authentication process (for example, setting the team_id of the currently selected team on the session: session(['team_id' => $team->team_id]); )"
Firstly: where do I set the team_id in session exactly? I'm unsure as to how I hook into the authentication process.
Thanks in advance!
13 replies