File tree Expand file tree Collapse file tree 7 files changed +598
-2
lines changed Expand file tree Collapse file tree 7 files changed +598
-2
lines changed Original file line number Diff line number Diff line change 36
36
"league/commonmark" : " ^2.2.1" ,
37
37
"league/flysystem" : " ^3.25.1" ,
38
38
"league/flysystem-local" : " ^3.25.1" ,
39
+ "league/uri" : " ^7.5.1" ,
39
40
"monolog/monolog" : " ^3.0" ,
40
41
"nesbot/carbon" : " ^2.72.2|^3.4" ,
41
42
"nunomaduro/termwind" : " ^2.0" ,
Original file line number Diff line number Diff line change 27
27
use Illuminate \Support \AggregateServiceProvider ;
28
28
use Illuminate \Support \Defer \DeferredCallbackCollection ;
29
29
use Illuminate \Support \Facades \URL ;
30
+ use Illuminate \Support \Uri ;
30
31
use Illuminate \Testing \LoggedExceptionCollection ;
31
32
use Illuminate \Testing \ParallelTestingServiceProvider ;
32
33
use Illuminate \Validation \ValidationException ;
@@ -89,6 +90,7 @@ public function register()
89
90
$ this ->registerDumper ();
90
91
$ this ->registerRequestValidation ();
91
92
$ this ->registerRequestSignatureValidation ();
93
+ $ this ->registerUriUrlGeneration ();
92
94
$ this ->registerDeferHandler ();
93
95
$ this ->registerExceptionTracking ();
94
96
$ this ->registerExceptionRenderer ();
@@ -188,6 +190,16 @@ public function registerRequestSignatureValidation()
188
190
});
189
191
}
190
192
193
+ /**
194
+ * Register the "defer" function termination handler.
195
+ *
196
+ * @return void
197
+ */
198
+ protected function registerUriUrlGeneration ()
199
+ {
200
+ Uri::setUrlGeneratorResolver (fn () => app ('url ' ));
201
+ }
202
+
191
203
/**
192
204
* Register the "defer" function termination handler.
193
205
*
Original file line number Diff line number Diff line change 11
11
use Illuminate \Support \Str ;
12
12
use Illuminate \Support \Traits \Conditionable ;
13
13
use Illuminate \Support \Traits \Macroable ;
14
+ use Illuminate \Support \Uri ;
14
15
use RuntimeException ;
15
16
use Symfony \Component \HttpFoundation \Exception \SessionNotFoundException ;
16
17
use Symfony \Component \HttpFoundation \InputBag ;
@@ -91,6 +92,16 @@ public function method()
91
92
return $ this ->getMethod ();
92
93
}
93
94
95
+ /**
96
+ * Get a URI instance for the request.
97
+ *
98
+ * @return \Illuminate\Support\Uri
99
+ */
100
+ public function uri ()
101
+ {
102
+ return Uri::of ($ this ->fullUrl ());
103
+ }
104
+
94
105
/**
95
106
* Get the root URL for the application.
96
107
*
You can’t perform that action at this time.
0 commit comments