Skip to content

Commit 4729437

Browse files
author
Pattanai
authored
Merge pull request #3 from tortuetorche/patch-1
Support Laravel 5.4
2 parents 0d0ea16 + 2693876 commit 4729437

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ConsoleServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class ConsoleServiceProvider extends ServiceProvider {
2020
*/
2121
public function boot(Router $router)
2222
{
23-
$router->middleware('console_protect', Http\Middlewares\Console::class);
23+
$middlewareMethod = method_exists($router, 'aliasMiddleware') ? 'aliasMiddleware' : 'middleware';
24+
$router->$middlewareMethod('console_protect', Http\Middlewares\Console::class);
2425

2526
// Publish config.
2627
$this->publishes([

0 commit comments

Comments
 (0)