PHP code example of hellomayaagency / laravel-heartbeat
1. Go to this page and download the library: Download hellomayaagency/laravel-heartbeat library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hellomayaagency / laravel-heartbeat example snippets
// app/Console/Kernel.php
protected function schedule(Schedule $schedule)
{
// ...
// Note: don't change the interval!
$schedule->command('heartbeat')->everyFiveMinutes();
}
// routes/web.php
Route::get('heartbeat', '\Maya\LaravelHeartbeat\Http\Controllers\HeartbeatController@index');
// or
Route::get('heartbeat', [HeartbeatController::class, 'index');
bash
php artisan heartbeat