2017 © Pedro Peláez
 

library laravel-url-shortener

Laravel Package for shortening urls

image

arietimmerman/laravel-url-shortener

Laravel Package for shortening urls

  • Thursday, December 7, 2017
  • by arietimmerman
  • Repository
  • 2 Watchers
  • 2 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Latest Stable Version Total Downloads, (*1)

A minimal Laravel package for shortening URLs. Apart for creating short URLs - like bitly - it also supported updating URL redirects and tracking URL clicks., (*2)

Laravel URL Shortener

Install the package. It supports Laravel 5.5 and up (including 7.0 and up)., (*3)

composer require arietimmerman/laravel-url-shortener
php artisan migrate

And start shortening URLs, (*4)

~~~.php (string)URLShortener::shorten("http://www.example.com");, (*5)


Or ~~~.bash php artisan url:shorten http://www.example.com

Usage for Laravel < 5.5

Add the service provider in your config/app.php., (*6)

~~~.php 'providers' => [ /* [..] / \ArieTimmerman\Laravel\URLShortener\ServiceProvider::class / [..] */ ];, (*7)


## Optional Publish the configuration and the view. ~~~.php php artisan vendor:publish --provider="ArieTimmerman\Laravel\URLShortener\ServiceProvider"

Optionally, register for URLVisit events in your EventServiceProvider., (*8)

~~~.php protected $listen = [ 'ArieTimmerman\Laravel\URLShortener\Events\URLVisit' => [ 'App\Listener\YourListener', ] ];, (*9)


## Configuration See `config/urlshortener.php` ## Docker Build and start the docker container.

docker-compose build docker-compose up, (*10)


Now shorten an URL like this

docker-compose exec laravel-url-shortener php artisan url:shorten https://www.example.com, (*11)


Check out the redirect

curl -v http://localhost:18123/code ~~~, (*12)

The Versions

07/12 2017

dev-master

9999999-dev

Laravel Package for shortening urls

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arie Timmerman

04/12 2017

dev-develop

dev-develop

Laravel Package for shortening urls

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arie Timmerman