fix! таблица агентов для менеджера
This commit is contained in:
parent
82f1014407
commit
5e406f9424
@ -17,17 +17,6 @@ public function __invoke(Request $request, Agent $agent)
|
||||
abort(403, 'Unauthorized action');
|
||||
}
|
||||
|
||||
$admin = CompanyAdmin::where('user_id', auth()->id())
|
||||
->where(
|
||||
'company_id',
|
||||
$agent->company_id
|
||||
);
|
||||
if (!$admin->count())
|
||||
{
|
||||
abort(404);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($agent->trashed()) {
|
||||
$agent->forceDelete();
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user