Deleted company check on middleware #rvwrev

This commit is contained in:
Cüneyt Şentürk 2021-10-05 15:38:48 +03:00
parent a3eccceb94
commit e8c46a9aa3

View File

@ -40,7 +40,13 @@ class IdentifyCompany
}
// Set company as current
company($company_id)->makeCurrent();
$company = company($company_id);
if (empty($company)) {
abort(500, 'Company not found');
}
$company->makeCurrent();
// Fix file/folder paths
config(['filesystems.disks.' . config('filesystems.default') . '.url' => url('/' . $company_id) . '/uploads']);