ignittion/short

Library for working with the Short.cm service

1.0.0 2018-04-09 07:42 UTC

This package is not auto-updated.

Last update: 2022-10-25 02:35:40 UTC


README

Total Downloads Latest Stable Version License

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=