| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function handle($request, Closure $next) |
||
| 17 | { |
||
| 18 | if ($theme = $request->query('cms-theme')) { |
||
| 19 | $finder = app('themes.view.finder'); |
||
| 20 | $basePath = config('themes.path.frontend', base_path('themes/frontend')); |
||
| 21 | $finder->removeBasePath(); |
||
| 22 | $finder->setBasePath($basePath . DIRECTORY_SEPARATOR . $theme); |
||
| 23 | |||
| 24 | config(['themes.frontend' => $theme]); |
||
| 25 | } |
||
| 26 | |||
| 27 | return $next($request); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |