Package Data | |
---|---|
Maintainer Username: | madeny |
Maintainer Contact: | me@madeny.me (madeny) |
Package Create Date: | 2017-03-31 |
Package Last Update: | 2019-11-17 |
Home Page: | https://packagist.org/packages/madeny/url-shortener |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 15:03:25 |
Package Statistics | |
---|---|
Total Downloads: | 412 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 5 |
Total Watchers: | 3 |
Total Forks: | 2 |
Total Open Issues: | 0 |
URL shortener package with Laravel Package Auto-Discovery.
Require through composer
composer require madeny/url-shortener
Or manually edit your composer.json file:
"require": {
"madeny/url-shortener": "1.0"
}
Config: .env to have this for bitly driver:
URL_SHORTENER_BITLY_USERNAME=username
URL_SHORTENER_BITLY_PASSWORD=password
for google driver:
URL_SHORTENER_GOOGLE_API_KEY=apikey
```php
\UrlShortener::shorten('http://google.com'); // Uses default driver as per config settings
\UrlShortener::driver('bitly')->shorten('http://google.com');
```
```php
\UrlShortener::expand('http://google.com'); // Uses default driver as per config settings
\UrlShortener::driver('bitly')->expand('http://google.com');
```