Skip to content

Commit

Permalink
Adding range filter command to artisan
Browse files Browse the repository at this point in the history
Signed-off-by: Hicham SADDEK <h.saddek@serrahub.com>
  • Loading branch information
hicham-saddek committed Jun 22, 2021
1 parent c6f7ed1 commit d94c7f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Providers/EloquentFiltersServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Milebits\Eloquent\Filters\Providers;

use Illuminate\Support\ServiceProvider;
use Milebits\Eloquent\Filters\Console\MakeFilterCommand;
use Milebits\Eloquent\Filters\Console\MakeRangeFilterCommand;

/**
Expand All @@ -13,7 +14,8 @@ class EloquentFiltersServiceProvider extends ServiceProvider
{
public function boot()
{
if ($this->app->runningInConsole())
$this->commands([MakeRangeFilterCommand::class]);
if (!$this->app->runningInConsole()) return;
$this->commands([MakeFilterCommand::class]);
$this->commands([MakeRangeFilterCommand::class]);
}
}

0 comments on commit d94c7f2

Please sign in to comment.