| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function handle($request, Closure $next) |
||
| 20 | { |
||
| 21 | $conn = \Session::get('conn'); |
||
| 22 | $value = \Session::get('db'); |
||
| 23 | if($conn === 'tenant') { |
||
| 24 | $key = 'database.connections.tenant.database'; |
||
| 25 | config([$key => $value]); |
||
| 26 | config(['database.default'=>'tenant']); |
||
| 27 | }else { |
||
| 28 | config(['database.default'=>'mysql']); |
||
| 29 | } |
||
| 30 | |||
| 31 | if ($request->has('_tenantId')) { |
||
| 32 | $request->request->remove('_tenantId'); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $next($request); |
||
| 36 | } |
||
| 44 |
This check looks for private methods that have been defined, but are not used inside the class.