saberqadimi/link-shortener

A Laravel package for shortening links.

v1.0.1 2025-03-11 07:49 UTC

This package is auto-updated.

Last update: 2025-03-11 07:57:07 UTC


README

img.png

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

A Laravel package for shortening URLs with analytics support. 🚀

Demo

Screencast.from.2025-03-11.10-41-03.webm

📥 Installation

You can install this package via Composer:

composer require saberqadimi/link-shortener

⚙️ Configuration

1️⃣ Publish the Service Provider

After installation, publish the package's service provider:

php artisan vendor:publish --provider="Laravel\LinkShortener\LinkShortenerServiceProvider"

2️⃣ Publish Assets (CSS & JS)

To use the front-end assets, run:

php artisan vendor:publish --tag=laravel/link-shortener

3️⃣ Run Migrations

The package comes with necessary database migrations. Run:

php artisan migrate

🚀 Usage

Once installed and configured, you can access the link shortener page at:

https://your-domain.com/link/shorten

⚠️ Note: The user must be logged in to access this page.

📄 License

This package is open-source and available under the MIT License.

💡 Quick Commands:

1️⃣ Install Packagecomposer require saberqadimi/link-shortener
2️⃣ Publish Service Providerphp artisan vendor:publish --provider="Laravel\LinkShortener\LinkShortenerServiceProvider"
3️⃣ Publish Assetsphp artisan vendor:publish --tag=laravel/link-shortener
4️⃣ Run Migrationsphp artisan migrate
5️⃣ Access Shortener Page/link/shorten (User must be logged in)