ideea/laravel-url-shortener

Laravel Package for shortening urls

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 15

pkg:composer/ideea/laravel-url-shortener

dev-master 2019-12-27 08:56 UTC

This package is auto-updated.

Last update: 2025-09-27 21:15:46 UTC


README

A Laravel package for shortening URLs. Apart for creating short URLs - like bitly - it also supported updating URL redirects and tracking URL clicks.

Laravel URL Shortener

Install the package

composer require arietimmerman/laravel-url-shortener

And start shortening URLs

(string)URLShortener::shorten("http://www.example.com");

For Laravel < 5.5

Add the service provider in your config/app.php.

'providers' => [
     // [..]
    \ArieTimmerman\Laravel\URLShortener\ServiceProvider::class
     // [..]
];

Optional

Publish the configuration and the view.

php artisan vendor:publish --provider="ArieTimmerman\Laravel\URLShortener\ServiceProvider"

Optionally, register for URLVisit events in your EventServiceProvider.

protected $listen = [
	'ArieTimmerman\Laravel\URLShortener\Events\URLVisit' => [
		'App\Listener\YourListener',
	]
];

Configuration

See config/urlshortener.php