Download the PHP package shammaa/laravel-url-shortener without Composer

On this page you can find all versions of the php package shammaa/laravel-url-shortener. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-url-shortener

Laravel URL Shortener

A professional, feature-rich URL shortener package for Laravel with password protection, QR codes, advanced analytics, hidden UTM tracking, and much more.

Features

Installation

Publish configuration and migrations:

Quick Start

Basic Usage

Using Helper Function

Features in Detail

Password Protection

Users will be prompted for a password when accessing the link. The password is verified in session, so they don't need to enter it again.

QR Code Generation

QR codes are automatically generated for all links:

Hidden UTM Tracking

Track UTM parameters without showing them in the URL:

The UTM parameters will be tracked in analytics but won't appear in the destination URL.

Link Expiry

Click Limits

Advanced Analytics

The package automatically tracks:

Access analytics:

Using with Models

The HasShortLink trait automatically creates short links for any Eloquent model with a model prefix + random code format (e.g., post-xyz1, article-abc2).

Basic Usage

How It Works

  1. Extracts model namePost becomes post
  2. Generates random codexyz1 (4 characters by default)
  3. Combines thempost-xyz1
  4. Ensures uniqueness → Checks database and regenerates if needed

Key Format

The trait generates keys in format: {model-name}-{random-code}

Custom Prefix

You can customize the prefix using a database field or method:

Option 1: Database Field

Option 2: Override Method

Priority Order:

  1. Custom field: short_link_prefix
  2. Custom method: getShortLinkPrefix()
  3. Model name: Auto-extracted (default)

Custom Destination URL

Automatic Creation

Create short links automatically when model is created:

Complete Example

Configuration

Customize random code length:

API Usage

Endpoints

Configuration

Edit config/url-shortener.php:

Performance

License

MIT

Author

Shadi Shammaa

Support

For issues and feature requests, please use the GitHub issue tracker.


All versions of laravel-url-shortener with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0
illuminate/routing Version ^9.0|^10.0|^11.0|^12.0
illuminate/cache Version ^9.0|^10.0|^11.0|^12.0
illuminate/validation Version ^9.0|^10.0|^11.0|^12.0
simplesoftwareio/simple-qrcode Version ^4.2
jenssegers/agent Version ^2.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shammaa/laravel-url-shortener contains the following files

Loading the files please wait ...