shimomo/laravel-ping
Laravel Ping
Installation
Install via Composer.
$ composer require shimomo/laravel-ping
Add to config/app.php.
<?php
return [
// ...
'providers' => [
// ...
Shimomo\Laravel\PingServiceProvider::class,
],
// ...
'aliases' => [
// ...
'Ping' => Shimomo\Laravel\PingFacade::class,
],
];
Usage
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
/**
* @author shimomo
*/
class PingController extends Controller
{
/**
* @return string
*/
public function execute()
{
if ($latency = \Ping::execute('https://example.com/')) {
return $latency . 'ms';
}
return 'Not exist.';
}
}
License
Laravel Ping is open-sourced software licensed under the MIT license.
Related Packages
rawand201/filament-connection-badge
A Filament topbar badge that shows real-time network quality (full/medium/low/of...
5,252
6
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
637,827,751
9,703
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 2.3.0 | >=7.0.0 | ^5.0.0 | MIT | |
| 2.2.0 | >=7.0.0 | ^5.0.0 | MIT | |
| 2.1.1 | >=7.0.0 | ^5.0.0 | MIT | |
| 2.1.0 | >=7.0.0 | ^5.0.0 | MIT | |
| 2.0.0 | >=7.0.0 | ^5.0.0 | MIT | |
| 1.2.1 | >=7.0.0 | ^5.0.0 | MIT | |
| 1.2.0 | >=7.0.0 | ^5.0.0 | MIT | |
| 1.1.0 | >=5.6.4 | ^5.0.0 | MIT | |
| 1.0.0 | >=5.6.4 | ^5.0.0 | MIT |