Completed
Push — master ( f85c01...38f866 )
by Song
02:09
created

Session::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 2
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
1
<?php
2
3
namespace Encore\Admin\Middleware;
4
5
use Illuminate\Http\Request;
6
7
class Session
8
{
9
    public function handle(Request $request, \Closure $next)
10
    {
11
        $path = '/' . trim(config('admin.route.prefix'), '/');
12
13
        config(['session.path' => $path]);
14
15
        if ($domain = config('admin.route.domain')) {
16
            config(['session.domain' => $domain]);
17
        }
18
19
        return $next($request);
20
    }
21
}
22