agiledevelopment/url-shortener-laravel
最新稳定版本:v1.0.3
Composer 安装命令:
composer require agiledevelopment/url-shortener-laravel
包简介
Seamless Laravel integration for AgileDevelopment URL Shortener SDK.
README 文档
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**
统计信息
- 总下载量: 176
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-02