daika7ana/shortenapi

Laravel ShortenAPI for my own ShortURL webapp

1.2 2018-03-08 23:14 UTC

This package is auto-updated.

Last update: 2024-09-29 05:27:44 UTC


README

Composer package

Requirements

  • Laravel > 5.5
  • PHP > 7.1

Installation

  • composer require daika7ana/shortenapi

  • php artisan vendor:publish the following Provider:

    Daika7ana\Shortenapi\ShortenapiServiceProvider

  • in %projectroot%/config/shortenapi.php configure your API url with a trailing slash afterwards

    'api_url' => 'http://example.ex/'

Usage

  • Shortenapi::shorten('https://example.ex/')
  • Shortenapi::expand('https://example.ex/6axQe2')