New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ndrd/lumen-bitly

Laravel package for generating bitly url
37
Install
composer require ndrd/lumen-bitly
Latest Version:1.1.10
PHP:>=7.1
Laravel:5 · 6
License:MIT
Last Updated:Oct 24, 2019
Links: GitHub  ·  Packagist
Maintainer: ndrd

Laravel Bitly Package

A laravel package for generating Bitly urls

For more information see Bitly

Build Status Latest Stable Version License Total Downloads Coverage Status

Requirements

Laravel 5.1 or later

Installation

Installation is a quick 3 step process:

  1. Download laravel-bitly using composer
  2. Enable the package in app.php
  3. Configure your Bitly credentials
  4. (Optional) Configure the package facade

Step 1: Download laravel-bitly using composer

Add shivella/laravel-bitly by running the command:

composer require shivella/laravel-bitly

Step 2: Enable the package in app.php

Register the Service in: config/app.php

Shivella\Bitly\BitlyServiceProvider::class,

Step 3: Configure Bitly credentials

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

Add this in you .env file

BITLY_ACCESS_TOKEN=your_secret_bitly_access_token

Step 4 (Optional): Configure the package facade

Register the Bitly Facade in: config/app.php

'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,

Usage

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

Or if you want to use facade, add this in your class after namespace declaration:

use Bitly;

Then you can use it directly by calling Bitly:: like:

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

Related Packages

shivella/laravel-bitly

Laravel package for generating bitly url

973,466 74
laragear/meta

A Laravel Package helper for Laravel Packages

1,316,350 7
cleaniquecoders/laravel-helper

Built with Laravel Standalone Package Creator

10,395 4
ipunkt/laravel-package-manager

Package Manager for laravel packages

1,744 2
wi-development/media

Admin's media

50 0

Version History

Version Released PHP Laravel License
1.1.10 >=7.1 ^5.1 || ^6.0 MIT
1.1.9 >=7.1 ^5.1 || ^6.0 MIT
1.1.8 >=7.1 ^5.1 || ^6.0 MIT
1.1.5 >=7.1 ^5.1 || ^6.0 MIT
1.1.2 >=7.1 ^5.1 || ^6.0 MIT