tenant_id) { session(['tenant_id' => $user->tenant_id]); return (int) $user->tenant_id; } return null; } }