PHP code example of anexia / laravel-monitoring

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

    

anexia / laravel-monitoring example snippets



namespace App\Helper;

use Anexia\Monitoring\Interfaces\UpMonitoringInterface;

class AnexiaMonitoringUpCheckHelper implements UpMonitoringInterface
{
    /**
     * Check the application according to your needs
     * @param array $errors
     * @return bool
     */
    public function checkUpStatus(&$errors = array())
    {
        // your custom check goes here
        /**
         * e.g.:
         *
         * if ($success) {
         *     return true;
         * } else {
         *     $errors[] = 'Database failure: something went wrong!';
         *     return false;
         * } 
         */
    }
}

"scripts": {
    "post-install-cmd": [
        "php artisan vendor:publish --provider=\"Anexia\\Monitoring\\Providers\\MonitoringServiceProvider\""
    ],
    "post-update-cmd": [
        "php artisan vendor:publish --provider=\"Anexia\\Monitoring\\Providers\\MonitoringServiceProvider\""
    ]
}

php artisan vendor:publish --provider="Anexia\Monitoring\Providers\MonitoringServiceProvider"

return [
    'providers' => [        
        /*
         * Anexia Monitoring Service Providers...
         */
        Anexia\Monitoring\Providers\MonitoringServiceProvider::class,
    ]
];

ERROR