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.
2 parents 4f0e1ef + 5de5878 commit 8c858e7Copy full SHA for 8c858e7
src/ServiceProvider.php
@@ -52,10 +52,14 @@ protected function registerRouterMacro()
52
53
protected function registerMiddleware()
54
{
55
- $this->app[Kernel::class]->appendMiddlewareToGroup(
56
- Config::get('inertia.middleware_group', 'web'),
57
- Middleware::class
58
- );
+ $kernel = $this->app[Kernel::class];
+
+ if (method_exists($kernel, 'appendMiddlewareToGroup')) {
+ $kernel->appendMiddlewareToGroup(
59
+ Config::get('inertia.middleware_group', 'web'),
60
+ Middleware::class
61
+ );
62
+ }
63
}
64
65
protected function shareValidationErrors()
0 commit comments