дебак с контрактами
This commit is contained in:
parent
ef9fdb0e2e
commit
e94d6d5e4e
@ -41,6 +41,8 @@ public function __invoke(Request $request, Company $company)
|
|||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_id' => $company->id
|
'company_id' => $company->id
|
||||||
]);
|
]);
|
||||||
|
Agent::where('user_id', $user->id)->delete();//удаляю, если уже была агентская учетка
|
||||||
|
|
||||||
Agent::create([
|
Agent::create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_id' => $company->id
|
'company_id' => $company->id
|
||||||
|
|||||||
@ -63,7 +63,7 @@
|
|||||||
'icon' => 'gear',
|
'icon' => 'gear',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (auth()->user()->hasRole($roles::SUPER_ADMIN) || auth()->user()->hasRole($roles::CITY_MANAGER)) {
|
if (auth()->user()->hasRole($roles::SUPER_ADMIN)) {
|
||||||
$items[] = [
|
$items[] = [
|
||||||
'target' => 'route',
|
'target' => 'route',
|
||||||
'route' => 'admin.index',
|
'route' => 'admin.index',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user