Skip to content

Commit

Permalink
Merge pull request #2 from jcalonso/lumen-compatibility
Browse files Browse the repository at this point in the history
Lumen compatibility
  • Loading branch information
NicolasMahe committed Feb 2, 2016
2 parents 18a32c3 + 938c717 commit 4ba6876
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
4 changes: 3 additions & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4ba6876

Please sign in to comment.