Looking to hire Laravel developers? Try LaraJobs

url-shortener-laravel maintained by agiledevelopment

Description
Seamless Laravel integration for AgileDevelopment URL Shortener SDK.
Author
Last update
2025/11/02 21:07 (dev-master)
License
Downloads
233

Comments
comments powered by Disqus

AgileDevelopment URL Shortener — Laravel Integration

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**