make sure company_id exists

This commit is contained in:
Denis Duliçi 2023-04-09 07:57:47 -07:00 committed by GitHub
parent 827bab48da
commit 0327ae6634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,6 +109,10 @@ trait Users
$company_id = company_id() ?: $this->getFirstCompanyOfUser()?->id;
if (empty($company_id)) {
return route('login');
}
return route($route_name, ['company_id' => $company_id]);
}