CanAccessPanel logic causing 403 error for livewire.update on Tenant Registration Form

Dealing with an issue that I think comes down to inexperience.

In my development environment, I am working on my logic for what panels a user has access to.

in my user model, i have these functions:
public function canAccessPanel(Panel $panel): bool
    {
        //if panel is admin, only saas employees can access
        if($panel->getId() === 'admin'){
            return $this->canAccessAdminPanel();
        }elseif ($panel->getId() === 'company') {
            return $this->canAccessCompanyPanel();
        }
        return false;
    }

    public function canAccessAdminPanel(): bool
    {
        return $this->isSaasEmployee();
    }

public function canAccessCompanyPanel(): bool
    {

        // Check if user is a SAAS employee
        if ($this->isSaasEmployee()) {
            return true;
        }

        // Check if user is associated with any companies
        if ($this->companies()->exists()) {
            return true;
        }

        return false;


Simple enough. Does what it is supposed to. However, I ran into problems. Because a newly registered user is not associated with a tenant yet, the user was not able to access the company/new page to create a tenant. Additionally, I realized they couldn't access the /company/logout page. Each presented with a 403 error.

This is where I worry I'm messing up. I added some exceptions based on routes:
Was this page helpful?