for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace FondBot\Console;
use Illuminate\Console\Command;
use FondBot\Channels\ChannelManager;
class ListChannelsCommand extends Command
{
protected $signature = 'fondbot:channel:list';
protected $description = 'List all registered channels';
public function handle(ChannelManager $manager): void
$rows = collect($manager->all())
->transform(function ($item, $name) use ($manager) {
return [$name, $manager->driver($item['driver'])->getName(), $manager->create($name)->getWebhookUrl()];
})
->toArray();
$this->table(['Name', 'Driver', 'Webhook URL'], $rows);
}