PHP code example of yeamin / bitly-laravel

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

    

yeamin / bitly-laravel example snippets

 php
Yeamin\Bitly\BitlyServiceProvider::class,

php artisan vendor:publish --provider="Yeamin\Bitly\BitlyServiceProvider"
 php
$url = app('bitly')->getShortUrl('https://www.google.com/'); // http://bit.ly/nHcn3
 php
$url = Bitly::getShortUrl('https://www.google.com/'); // http://bit.ly/nHcn3
 php
$shortUrl = app('bitly')->getLongUrl('http://bit.ly/nHcn3'); // https://www.google.com/
 php
$url = Bitly::getLongUrl('http://bit.ly/nHcn3'); // https://www.google.com/