@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | public function query(): Builder |
17 | 17 | { |
18 | - $conn = $this->getConnection(); |
|
18 | + $conn = $this->getConnection(); |
|
19 | 19 | return Person::selectRaw(' |
20 | 20 | people.id, people.title, people.givn, people.surn, people.appellative, people.email, people.phone, |
21 | 21 | people.birthday, CASE WHEN users.id is null THEN 0 ELSE 1 END as "user", |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | ')->leftJoin('users', 'people.id', '=', 'users.person_id') |
24 | 24 | ->leftJoin( |
25 | 25 | 'company_person', |
26 | - fn ($join) => $join |
|
26 | + fn($join) => $join |
|
27 | 27 | ->on('people.id', '=', 'company_person.person_id') |
28 | 28 | ->where('company_person.is_main', true) |
29 | 29 | )->leftJoin('companies', 'company_person.company_id', 'companies.id'); |
@@ -120,7 +120,7 @@ |
||
120 | 120 | } else { |
121 | 121 | $this->setConnection('mysql'); |
122 | 122 | } |
123 | - $conn = $this->getConnection(); |
|
123 | + $conn = $this->getConnection(); |
|
124 | 124 | return $conn; |
125 | 125 | } |
126 | 126 | } |
@@ -20,11 +20,11 @@ |
||
20 | 20 | { |
21 | 21 | $conn = \Session::get('conn'); |
22 | 22 | $value = \Session::get('db'); |
23 | - if($conn === 'tenant') { |
|
23 | + if ($conn === 'tenant') { |
|
24 | 24 | $key = 'database.connections.tenant.database'; |
25 | 25 | config([$key => $value]); |
26 | 26 | config(['database.default'=>'tenant']); |
27 | - }else { |
|
27 | + } else { |
|
28 | 28 | config(['database.default'=>'mysql']); |
29 | 29 | } |
30 | 30 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $key = 'database.connections.tenant.database'; |
25 | 25 | config([$key => $value]); |
26 | 26 | config(['database.default'=>'tenant']); |
27 | - }else { |
|
27 | + } else { |
|
28 | 28 | config(['database.default'=>'mysql']); |
29 | 29 | } |
30 | 30 |