Skip to content

shimomo/laravel-ping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Ping for Laravel.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages