We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa1ee57 commit 20b257fCopy full SHA for 20b257f
src/Illuminate/Routing/RouteRegistrar.php
@@ -7,6 +7,7 @@
7
use Closure;
8
use Illuminate\Support\Arr;
9
use Illuminate\Support\Reflector;
10
+use Illuminate\Support\Traits\Macroable;
11
use InvalidArgumentException;
12
13
/**
@@ -34,6 +35,9 @@
34
35
class RouteRegistrar
36
{
37
use CreatesRegularExpressionRouteConstraints;
38
+ use Macroable {
39
+ __call as macroCall;
40
+ }
41
42
43
* The router instance.
@@ -280,6 +284,10 @@ protected function compileAction($action)
280
284
*/
281
285
public function __call($method, $parameters)
282
286
287
+ if (static::hasMacro($method)) {
288
+ return $this->macroCall($method, $parameters);
289
290
+
283
291
if (in_array($method, $this->passthru)) {
292
return $this->registerRoute($method, ...$parameters);
293
}
0 commit comments