PHP code example of kapersoft / cron-job-api-for-laravel
1. Go to this page and download the library: Download kapersoft/cron-job-api-for-laravel 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/ */
kapersoft / cron-job-api-for-laravel example snippets
use Kapersoft\CronJobApi\Client;
final readonly class JobsController
{
public function __construct(private Client $client) {}
public function index() {
$list = $client->list();
// ...
}
}
use Kapersoft\CronJobApiForLaravel\Facades\CronJobApi;
$jobs = CronJobApi::list();
use Kapersoft\CronJobApi\Job;
$jobList = $client->list();
foreach ($jobList->jobs as $job) {
/** @var Job $job */
echo $job->jobId.' '.$job->title.PHP_EOL;
}