my-monitor/ping-sdk

There is no license information available for the latest version (0.0.2) of this package.

0.0.2 2018-01-29 11:22 UTC

This package is not auto-updated.

Last update: 2024-11-16 16:07:29 UTC


README

this is a simple package to use uptime service in MyMonitor/Servers-Mointor project

Usage

to ping any service just use the PingSdkFacade class like below example

// $images->optimize();
\MyMonitor\PingSdk\PingSdkFacade::ping('<Ping Key>');

Note: it will throw an HttpNotFoundException if the Ping Key is not valid

Installation

You can install this package via composer using this command:

composer require my-monitor/ping-sdk

then in app.php provideres array add service provider

    //
    MyMonitor\PingSdk\PingSdkServiceProvider::class,

You can publish the config-file with:

php artisan vendor:publish --provider="MyMonitor\PingSdk\PingSdkServiceProvider::class"

This is the contents of the published config file:

<?php

return [
    'api_endpoint' => env('PINGSDK_API_ENDPOINT',null),
    'api_token' => env('PINGSDK_API_TOKEN',null),
];

Lumen Support

Lumen configuration is slightly more involved but features and API are identical to Laravel.

Install using this command:

composer require my-monitor/ping-sdk

Uncomment the following lines in the bootstrap file or add them if missing:

// bootstrap/app.php:
$app->withFacades();
$app->withEloquent();

Configure the pacakge service provider

// bootstrap/app.php:
$app->register(MyMonitor\PingSdk\PingSdkServiceProvider::class);

Finally, update boostrap/app.php to load the config file:

// bootstrap/app.php
$app->configure('mymonitor-ping');

Credits

License

The MIT License (MIT). Please see License File for more information.