shimomo/laravel-ping

Ping for Laravel.
3,582 3
Install
composer require shimomo/laravel-ping
Latest Version:2.3.0
PHP:>=7.0.0
License:MIT
Last Updated:May 19, 2017
Links: GitHub  ·  Packagist
Maintainer: shimomo

Laravel Ping

Build Status Coverage Status Latest Stable Version Total Downloads Dependency Status MIT License

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

garf/laravel-pinger

Ping search engines about website updates

23,126 23
spatie/ping

Run an ICMP ping and get structured results

85,558 94
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