media365/squeezer
Composer 安装命令:
composer require media365/squeezer
包简介
url shorten package using Laravel
README 文档
README
URL shortening or squeezing package in Laravel.
Installation
You can easily install this package using Composer, by running the following command:
composer require media365/squeezer
Requirements
This package has the following requirements:
- PHP 7.1 or higher
- Laravel 5.1 or higher
Laravel 5.5+
If you use Laravel 5.5 or higher, that's it. You can now use the package, continue to the usage section.
Laravel 5.1-5.4
If you're using an older version of Laravel, register the package's service provider to your application. You can do
this by adding the following line to your config/app.php file:
'providers' => [ ... Media365\Squeezer\SqueezerServiceProvider::class, ... ],
Usage
$shortener = app('url.shortener');
Once you have an instance of the shortener, you can shorten your URLs:
// This will return your shortened URL as a string $shortener->shorten('https://github.com');
You can provide driver to shorten url
// This will return your shortened URL as a string with provided driver $shortener->driver('is_gd')->shorten('https://github.com')
统计信息
- 总下载量: 30.65k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-01