2017 © Pedro Peláez
 

library laravel-ping

Simple Ping For Laravel Applications

image

karlmonson/laravel-ping

Simple Ping For Laravel Applications

  • Friday, May 25, 2018
  • by karlmonson
  • Repository
  • 3 Watchers
  • 6 Stars
  • 5,988 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 5 Versions
  • 8 % Grown

The README.md

Ping for Laravel

This Laravel package is simple and unopinionated. It simply returns the HTTP Status Code for a provided URL., (*1)

Installation

Install via Composer:, (*2)

composer require karlmonson/laravel-ping

You'll need to register the ServiceProvider and Facade:, (*3)

// config/app.php

'providers' => [
    // ...
    Karlmonson\Ping\PingServiceProvider::class,
];

'aliases' => [
    // ...
    'Ping' => Karlmonson\Ping\Facades\Ping::class,
];

Usage

<?php

namespace App\Http\Controllers;

use Ping;
use App\Http\Controllers\Controller;

class LinkController extends Controller
{
    /**
     * Show the current health of a given URL.
     *
     * @param  string  $url
     * @return string
     */
    public function healthCheck($url)
    {
        $health = Ping::check($url);

        if($health == 200) {
            return 'Alive!';
        } else {
            return 'Dead :(';
        }
    }
}

Credits

License

The MIT License (MIT). Please see License File for more information., (*4)

The Versions

25/05 2018

dev-master

9999999-dev

Simple Ping For Laravel Applications

  Sources   Download

MIT

The Requires

 

25/05 2018

1.0.4

1.0.4.0

Simple Ping For Laravel Applications

  Sources   Download

MIT

The Requires

 

09/05 2017

1.0.2

1.0.2.0

Simple Ping For Laravel Applications

  Sources   Download

MIT

The Requires

 

10/02 2017

1.0.1

1.0.1.0

Simple Ping For Laravel Applications

  Sources   Download

MIT

The Requires

 

21/07 2016

1.0.0

1.0.0.0

Simple Ping For Laravel Applications

  Sources   Download

MIT

The Requires