/** * Get artisan commands to pass through to PsySH. * * @return array */ protected function getCommands() { $commands = []; foreach ($this->console->all() as $name => $command) { if (in_array($name, $this->commandWhiteList)) { $commands[] = $command; } } return $commands; }