PHP code example of biscolab / laravel-updown

1. Go to this page and download the library: Download biscolab/laravel-updown library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

biscolab / laravel-updown example snippets


'providers' => [
    ...
    Biscolab\LaravelUpDown\UpDownServiceProvider::class,
];

'aliases' => [
    ...
    'UpDown' => Biscolab\LaravelUpDown\Facades\UpDown::class,
];

UPDOWN_API_KEY=<YOUR_UPDOWN_API_KEY>

return [
    'api_key' => env('UPDOWN_API_KEY', ''),       
];

updown();

// List all Checks: returns a Checks collection
// Empty Check instance
$checks = updown()->Check()->all();

// Check instance initialized with "xxxx" token
$check = updown()->Check("xxxx");

// Check instance initialized with $params array
// using Biscolab\UpDown\Fields\CheckFields
$params = [
    CheckFields::URL => 'https://insert.your-url.to/check'
];
$check = updown()->Check($params);
sh
php artisan config:cache
su
php artisan vendor:publish --provider="Biscolab\LaravelUpDown\UpDownServiceProvider"