PHP code example of laravel-ops / connector
1. Go to this page and download the library: Download laravel-ops/connector 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/ */
laravel-ops / connector example snippets
'providers' => [
// ...
LaravelOps\Connector\ConnectorServiceProvider::class,
],
$method = 'GET';
$path = '/api/connector/v1/health';
$timestamp = '2026-10-16T10:00:00Z';
$nonce = 'random_string';
$bodyHash = ''; // SHA256 hash of request body (empty for GET)
$stringToSign = "$method|$path|$timestamp|$nonce|$bodyHash";
$signature = hash_hmac('sha256', $stringToSign, $apiSecret);
'allowed_operations' => [
'cache:clear',
'config:clear',
'route:clear',
'view:clear',
'event:clear',
'optimize:clear',
'migrate:status',
],
// Timestamp tolerance (seconds)
'timestamp_tolerance' => 300, // 5 minutes
// Nonce cache duration (seconds)
'nonce_cache_duration' => 300, // 5 minutes
// Enable/disable operations
'enable_operations' => true,
bash
php artisan vendor:publish --tag=connector-config
bash
php artisan connector:enroll --token=enr_xxxxx --central-url=https://laravel-ops.test
bash
# From Laravel Ops
php artisan connector:test-connection {application_id}