Commit 12a9bae 1 parent 7684632 commit 12a9bae Copy full SHA for 12a9bae
File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Exception ;
6
6
use Illuminate \Routing \Router ;
7
+ use Illuminate \Support \Str ;
7
8
use Spatie \MissingPageRedirector \Events \RedirectNotFound ;
8
9
use Spatie \MissingPageRedirector \Events \RouteWasHit ;
9
10
use Spatie \MissingPageRedirector \Redirector \Redirector ;
@@ -34,8 +35,8 @@ public function getRedirectFor(Request $request)
34
35
$ redirects = $ this ->redirector ->getRedirectsFor ($ request );
35
36
36
37
collect ($ redirects )->each (function ($ redirects , $ missingUrl ) {
37
- if (str ($ missingUrl )->contains ('* ' )) {
38
- $ missingUrl = str ( $ missingUrl )-> replace ('* ' , '{wildcard} ' );
38
+ if (Str:: of ($ missingUrl )->contains ('* ' )) {
39
+ $ missingUrl = Str:: replace ('* ' , '{wildcard} ' , $ missingUrl );
39
40
}
40
41
41
42
$ this ->router ->get ($ missingUrl , function () use ($ redirects , $ missingUrl ) {
You can’t perform that action at this time.
0 commit comments