Company id check removed from admins

This commit is contained in:
Prashant Singh 2019-06-29 15:56:13 +05:30
parent 8ef75d2be7
commit 15690a1f0d
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,11 @@ class DatabasePresenceVerifier extends BaseVerifier
{
$company = Company::getCurrent();
if (count(explode('as', $table)) == 2) {
$table = explode('as', $table);
$table = trim($table[0]);
}
if (isset($company->id) && $table != 'admins') {
return $this->db->connection($this->connection)->table($table)->useWritePdo()->where ('company_id', '=', $company->id);
} else {