How to create login sessions after admin login

Before incorporating Filament my current project had a Login method that created different session so that they'd be in use in the entire application
$request->session()->regenerate();
$userID = Auth::user()->id;
$user = User::find($userID);
// $role = $user->role;
$roles = $user->roles->pluck("name");
$permissions = $user->permissions;
$deptID = $user->deptID;
$name = Auth::user()->name." ".Auth::user()->last_name;

session(['rol' => $roles]);
session(['permissions' => $permissions]);
session(['id' => $userID]);
session(['departamento' => $deptID]);
session(['fullName' => $name]);
$request->session()->regenerate();
$userID = Auth::user()->id;
$user = User::find($userID);
// $role = $user->role;
$roles = $user->roles->pluck("name");
$permissions = $user->permissions;
$deptID = $user->deptID;
$name = Auth::user()->name." ".Auth::user()->last_name;

session(['rol' => $roles]);
session(['permissions' => $permissions]);
session(['id' => $userID]);
session(['departamento' => $deptID]);
session(['fullName' => $name]);
Naturally, filament has it's own admin Login, and by default, it lacks these features How would I recreate these sessions on Admin login?
1 Reply
Want results from more Discord servers?
Add your server