PHP code example of leadthread / laravel-shortener

1. Go to this page and download the library: Download leadthread/laravel-shortener 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/ */

    

leadthread / laravel-shortener example snippets


LeadThread\Shortener\ShortenerServiceProvider::class

"Shortener" => "LeadThread\Shortener\Facades\Shortener",

$url = "https://github.com/leadthread/laravel-shortener";
$shortUrl = Shortener::shorten($url);
// (string) http://bit.ly/2amWdrE

//If you updated your aliases array in "config/app.php"
use Shortener;
//or if you didnt...
use LeadThread\Shortener\Facades\Shortener;
bash
php artisan vendor:publish