PHP code example of spatie / laravel-horizon-watcher

1. Go to this page and download the library: Download spatie/laravel-horizon-watcher 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/ */

    

spatie / laravel-horizon-watcher example snippets


return [
    /*
     * Horizon will be restarted when any PHP file inside these directories 
     * get created, updated or deleted. You can also specify other kinds
     * of files here.
     */
    'paths' => [
        app_path(),
        config_path(),
        database_path(),
        resource_path('views'),
        base_path('.env'),
        base_path('composer.lock'),
    ],

    /*
     * This command will be executed to start Horizon.
     */
    'command' => 'php artisan horizon',
];
bash
php artisan vendor:publish --tag="horizon-watcher-config"