agiledevelopment/url-shortener-laravel

Seamless Laravel integration for AgileDevelopment URL Shortener SDK.

Installs: 74

Dependents: 0

Suggesters: 0

Security: 0

pkg:composer/agiledevelopment/url-shortener-laravel

v1.0.3 2025-11-02 20:07 UTC

This package is not auto-updated.

Last update: 2026-01-26 19:21:47 UTC


README

A super-lightweight Laravel package that glues the [Agile Development URL Shortener SDK] directly into Laravel.

Powered by the 00x.dk API, this package lets you shorten URLs instantly inside your Laravel app β€” no facades, no config publishing, no boilerplate.

πŸš€ Installation

composer require agiledevelopment/url-shortener-laravel

βš™οΈ Environment Setup

Add your API token to your .env file:

URL_SHORTENER_TOKEN=your_token_here

You can generate a token at 00x.dk.

πŸ’‘ Usage

1️⃣ Quick Helper

$short = shorten_url('https://example.com');

echo $short['shortened_url'];

That’s it! The helper automatically reads your token from .env.

🧱 Example Response

{
  "shortened_url": "https://00x.dk/abcd1234"
  "original_url": "https://example.com",
  "code": "abcd1234",
  "message": "URL shortened successfully!"
}

🧰 Requirements

  • PHP 7.4 or newer
  • Laravel 8–11
  • A valid 00x.dk API token

πŸ“ License

This project is licensed under the MIT License.

Made with ❀️ by **Agile Development**