File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,33 @@ public function __construct() {
13
13
protected function matchDomain () {
14
14
if ($ this ->domain !== null ) {
15
15
16
+ if (is_array ($ this ->domain )) {
17
+
18
+ $ max = count ($ this ->domain );
19
+
20
+ for ($ i = 0 ; $ i < $ max ; $ i ++) {
21
+ $ domain = $ this ->domain [$ i ];
22
+
23
+ $ parameters = $ this ->parseParameters ($ domain , request ()->getHost (), '[^.]* ' );
24
+
25
+ if ($ parameters !== null ) {
26
+ $ this ->parameters = $ parameters ;
27
+ return true ;
28
+ }
29
+ }
30
+
31
+ return null ;
32
+ }
33
+
16
34
$ parameters = $ this ->parseParameters ($ this ->domain , request ()->getHost (), '[^.]* ' );
17
35
18
- if ($ parameters !== null ) {
36
+ if ($ parameters !== null ) {
19
37
$ this ->parameters = $ parameters ;
38
+ return true ;
20
39
}
21
40
}
41
+
42
+ return null ;
22
43
}
23
44
24
45
public function renderRoute (Request $ request ) {
@@ -37,7 +58,9 @@ public function renderRoute(Request $request) {
37
58
throw new RouterException ('Method not allowed ' );
38
59
}
39
60
40
- $ this ->matchDomain ();
61
+ if ($ this ->matchDomain () === null ) {
62
+ return null ;
63
+ }
41
64
42
65
return parent ::renderRoute ($ request );
43
66
}
You can’t perform that action at this time.
0 commit comments