From 1c14f2bc6f7ee17add9f8d55b26f2c7060e64208 Mon Sep 17 00:00:00 2001
From: Juan Carlos Alonso <me@jcalonso.com>
Date: Thu, 28 Jan 2016 23:45:03 +0000
Subject: [PATCH 1/2] Check if its Laravel, avoid publishing the configuration
 file if its Lumen

---
 src/ServiceProvider.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php
index 3b3a061..c0751de 100644
--- a/src/ServiceProvider.php
+++ b/src/ServiceProvider.php
@@ -21,7 +21,9 @@ class ServiceProvider extends ServiceProviderParent
   public function boot()
   {
     //config
-    $this->publishes([__DIR__ . '/config.php' => config_path('slack-output.php')]);
+    if (class_exists('Illuminate\Foundation\Application', false)) {
+      $this->publishes([__DIR__ . '/config.php' => config_path('slack-output.php')]);
+    }
 
     //command
     $this->commands(

From 938c7174fbd600911ee869f531a44b855f263d16 Mon Sep 17 00:00:00 2001
From: Juan Carlos Alonso <me@jcalonso.com>
Date: Thu, 28 Jan 2016 23:45:45 +0000
Subject: [PATCH 2/2] Fixed issue when artisan command is not wrapped around
 single quotes

---
 src/Service.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Service.php b/src/Service.php
index 946a7e3..8b515df 100644
--- a/src/Service.php
+++ b/src/Service.php
@@ -60,7 +60,8 @@ function __construct(array $config)
    */
   public function scheduledCommand(Event $event)
   {
-    $eventCommand = explode("'artisan' ", $event->command)[1];
+    preg_match("/(artisan |'artisan' )(.*)/us", $event->command, $matches);
+    $eventCommand = $matches[2];
 
     $event->sendOutputTo(base_path() . '/storage/logs/'.$eventCommand.'.txt');
     if (is_null($event->output)) {