PHP code example of ariadata / larastack-supervisor
1. Go to this page and download the library: Download ariadata/larastack-supervisor 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/ */
use LarastackSupervisor;
// Start a service
LarastackSupervisor::start('laravel-horizon');
// Stop a service
LarastackSupervisor::stop('laravel-horizon');
// Restart a service
LarastackSupervisor::restart('laravel-horizon');
// Get the status of all services
$statuses = LarastackSupervisor::status('all');
// List all processes
$processes = LarastackSupervisor::list();
// Start all services
larastack_supervisor()->start('all');
// Stop a specific service
larastack_supervisor()->stop('laravel-horizon');
// Restart a specific service
larastack_supervisor()->restart('laravel-horizon');
// Check the status of all services
$statuses = larastack_supervisor()->status('all');
// List all processes
$processes = larastack_supervisor()->list();