PHP code example of shivella / laravel-bitly

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

    

shivella / laravel-bitly example snippets




return [
    'aliases' => [

        'App' => Illuminate\Support\Facades\App::class,
        'Artisan' => Illuminate\Support\Facades\Artisan::class,
        'Auth' => Illuminate\Support\Facades\Auth::class,
        // ...
        'Bitly' => Shivella\Bitly\Facade\Bitly::class,
    ],
    // ...
];



$url = app('bitly')->getUrl('https://www.google.com/'); // http://bit.ly/nHcn3



use Bitly;



$url = Bitly::getUrl('https://www.google.com/'); // http://bit.ly/nHcn3



namespace Tests;

use Illuminate\Contracts\Console\Kernel;
use Shivella\Bitly\Testing\BitlyClientFake;

trait CreatesApplication
{
    /**
     * Creates the application.
     *
     * @return \Illuminate\Foundation\Application
     */
    public function createApplication()
    {
        $app = 
 php
Shivella\Bitly\BitlyServiceProvider::class,

php artisan vendor:publish --provider="Shivella\Bitly\BitlyServiceProvider"