Skip to content
A Laravel package to shorten urls
Branch: master
Clone or download
Latest commit f09b339 Mar 11, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Add a blacklist for urls May 24, 2018
database/migrations Fetch url title and description May 18, 2018
src Apply fixes from StyleCI (#10) May 24, 2018
tests Support laravel 5.8 Mar 11, 2019
.gitignore Initial commit Feb 23, 2018
.travis.yml Add php 7.3 Jan 1, 2019
LICENSE Initial commit Feb 23, 2018 Fix syntax May 24, 2018
composer.json Support laravel 5.8 Mar 11, 2019
composer.lock Update dependencies Jan 1, 2019
phpunit.xml Remove syntaxCheck May 18, 2018

Laravel Short Url Build Status StyleCI

Laravel Short Url is a package allowing you to shorten urls.


With composer

composer require gallib/laravel-short-url

then run

php artisan vendor:publish --provider="Gallib\ShortUrl\ShortUrlServiceProvider"
php artisan migrate

finally, paste ShortUrl::routes(); at the end of routes/web.php


Laravel Short Url configuration file can be found on config/shorturl.php

  • blacklist : Allows to blacklist urls. Keywords can be either an url, a keyword or an extension

Advanced configuration

Instead of adding ShortUrl::routes(); you can call three separates methods:

  • ShortUrl::createRoutes(); to shorten urls
  • ShortUrl::manageRoutes(); to manage urls
  • ShortUrl::redirectRoute(); to redirect to the url

this allows you to add middlewares or prefix routes.


Laravel short url is now set up on your homepage.

You can’t perform that action at this time.