laravel
🚀
envoyer
🚀
Quick Command to send Heartbeat pings to Envoyer
The Kernel just needs this line.
$schedule->command('heartbeat')->everyFiveMinutes()->environments('production');
And then the command is this
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Http;
class PingEnvoyer extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'heartbeat';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Envoyer Heartbeat';
public function handle(): void
{
Http::get('http://beats.envoyer.io/heartbeat/' . env('ENVOYER_PING'));
}
}
Now it will call home