for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CSlant\LaravelTelegramGitNotifier\Commands;
use CSlant\LaravelTelegramGitNotifier\Services\WebhookService;
use CSlant\TelegramGitNotifier\Exceptions\WebhookException;
use Illuminate\Console\Command;
class SetWebhook extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'tg-notifier:webhook:set';
* The console command description.
protected $description = 'Set webhook';
* Execute the console command.
* @return void
public function handle(): void
try {
$webhookService = new WebhookService();
$this->info($webhookService->setWebhook());
} catch (WebhookException $e) {
$this->error($e->getMessage());
}