added customer scopes to user model

This commit is contained in:
Denis Duliçi
2021-09-01 23:16:41 +03:00
parent 980fd9a198
commit 1b648a2598
7 changed files with 49 additions and 7 deletions

View File

@@ -100,7 +100,7 @@ trait Users
return route('login');
}
$route_name = $user->can('read-client-portal') ? 'portal.dashboard' : $user->landing_page;
$route_name = $user->isCustomer() ? 'portal.dashboard' : $user->landing_page;
$company_id = company_id() ?: optional($this->getFirstCompanyOfUser())->id;