my-monitor / ping-sdk
Requires
- guzzlehttp/guzzle: ^6.2
- illuminate/support: 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*
Requires (Dev)
- mockery/mockery: ^0.9.5
- orchestra/testbench: ~3.3|~3.4
- phpunit/phpunit: ~5.7
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.