From 3ca7d63ccd2221d7da4fea02f34150b963aac8b6 Mon Sep 17 00:00:00 2001 From: Mark Topper Date: Fri, 2 Feb 2018 13:55:18 +0100 Subject: [PATCH] Register commands for non-console This is required for applications that want to usage installation of any hook while they run Laravel Dusk. --- src/HooksServiceProvider.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/HooksServiceProvider.php b/src/HooksServiceProvider.php index 3b475b2..bc70d08 100644 --- a/src/HooksServiceProvider.php +++ b/src/HooksServiceProvider.php @@ -21,15 +21,12 @@ public function register() return; } - // Registers resources and commands - if ($this->app->runningInConsole()) { - $this->registerCommands(); - - $this->publishes( - [$configPath => config_path('hooks.php')], - 'hooks-config' - ); - } + $this->registerCommands(); + + $this->publishes( + [$configPath => config_path('hooks.php')], + 'hooks-config' + ); // Register Hooks system and aliases $this->app->singleton(Hooks::class, function ($app) {