| Package Data | |
|---|---|
| Maintainer Username: | shimomo |
| Package Create Date: | 2017-01-14 |
| Package Last Update: | 2017-05-19 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-06 15:12:14 |
| Package Statistics | |
|---|---|
| Total Downloads: | 3,577 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 3 |
| Total Watchers: | 1 |
| Total Forks: | 5 |
| Total Open Issues: | 1 |
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,
],
];
<?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.';
}
}
Laravel Ping is open-sourced software licensed under the MIT license.