ignittion / short
Library for working with the Short.cm service
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 3 975
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 3
Open Issues: 2
Requires
- php: >=7.0
- guzzlehttp/guzzle: ^6.3
This package is not auto-updated.
Last update: 2022-10-25 02:35:40 UTC
README
About
Library for working with the Short.cm service
Issues
If you have any problems please open an Issue.
Setup
Requirements
- PHP >= 7.0
- guzzlehttp/guzzle ^6.3
- A short.cm account.
Installation
Install via Composer:
composer require ignittion/short
Configuration
PHP
Import the Composer autoload file.
require require __DIR__.'/vendor/autoload.php';
Create a new instance of Short.
$api = 'https://api.short.cm';
$domain = 'short.tld';
$key = 'abc123';
$short = new Ignittion\Short($api, $domain, $key);
Laravel 5.1+
Add the Service Provider in config/app.php
:
Ignittion\Short\ShortServiceProvider::class,
Add the Class Alias in config/app.php
:
'Short' => Ignittion\Short\Facades\Short::class,
Publish the Config file:
php artisan vendor:publish
Add config settings to .env
SHORTCM_API=https://api.short.cm
SHORTCM_DOMAIN=
SHORTCM_KEY=