Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update CommandService.php
  • Loading branch information
dorgan authored Dec 23, 2024
commit e2d847e4ddd8f9e36ef271c794ea12f4c40d9f24
4 changes: 2 additions & 2 deletions src/Http/Services/CommandService.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace RobersonFaria\DatabaseSchedule\Http\Services;

use App\Console\Kernel;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Collection;

class CommandService
{
public function get(): Collection
{
$commands = collect(app(Kernel::class)->all())->sortKeys();
$commands = collect(app( Artisan::class)->all())->sortKeys();
$commandsKeys = $commands->keys()->toArray();
foreach (config('database-schedule.commands.exclude') as $exclude) {
$commandsKeys = preg_grep("/^$exclude/", $commandsKeys, PREG_GREP_INVERT);
Expand Down