parsadanashvili / laravel-cuttly
Cutt.ly Package For Shorten Your Links
Installs: 44
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/parsadanashvili/laravel-cuttly
Requires
- php: >=7.4
- ext-json: *
- guzzlehttp/guzzle: ^6|^7
- illuminate/support: >=5.3
README
This package allows you to process shorten links with Cutt.ly from your Laravel application.
Installation
composer require parsadanashvili/laravel-cuttly
For Laravel <= 5.4
If you're using Laravel 5.4 or lower, you have to manually add a service provider in your config/app.php file.
Open config/app.php and add CuttlyServiceProvider to the providers array.
'providers' => [ # Other providers Parsadanashvili\LaravelCuttly\CuttlyServiceProvider::class, ],
Publish migrations and config by running:
php artisan vendor:publish --provider="Parsadanashvili\LaravelCuttly\CuttlyServiceProvider"
API Keys
Place api key to .env file:
CUTTLY_API_KEY=CuttlyApiKey
Shorten Url
To shorten url you should use Shorten Url function
Parameters:
url-string, required
Return: https://cutt.ly/mFtHxpP
use Parsadanashvili\LaravelCuttly\Requests\ShortenUrl; return ShortenUrl::request('https://google.com') ->name('Name') //optional ->useDomain() //optional ->process();
