Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function handle($request, Closure $next) |
||
36 | { |
||
37 | // Here you may use whatever mechanism you use in your app |
||
38 | // to determine the current tenant. To demonstrate, the |
||
39 | // $tenantId is set here from the user's account_id. |
||
40 | //$tenantId = $request->user()->account_id; |
||
41 | |||
42 | //$this->bouncer->scope()->to($tenantId); |
||
43 | |||
44 | $this->bouncer->scope()->to(request('subdomain'))->onlyRelations()->dontScopeRoleAbilities(); |
||
45 | |||
46 | return $next($request); |
||
47 | } |
||
49 |