Download the PHP package istiak-tridip/laravel-sqids without Composer

On this page you can find all versions of the php package istiak-tridip/laravel-sqids. 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-sqids

πŸ¦‘ Laravel Sqids

Test Status Total Downloads Latest Version License Laravel Compatibility

Laravel Sqids is a lightweight wrapper around Sqids (pronounced "squids"), an open-source library for generating short, URL-safe, non-sequential, and unique identifiers from numbers.

This package simplifies the integration of Sqids into your Laravel application, providing a clean and efficient way to obscure raw database IDs in URLs, forms, or other scenarios where unique, aesthetically pleasing identifiers are needed without storing them in the database.


✨ Features:

Installation

Install the package via Composer:

[!IMPORTANT] This package requires PHP 8.3 or higher and is compatible with Laravel 11.x, 12.x and 13.x.

If you need to customize the default configuration, publish the config file:

πŸš€ Getting Started

To use Sqids with a model, simply add the HasSqids trait to your model:

πŸ‘©β€πŸ’» Usage

πŸ› οΈ Accessing Sqids

You can access the Sqid directly from the model:

If needed, you can decode the Sqid back to the original ID:


πŸ” Query Helpers

When querying models using Sqids, you can use the provided query scopes instead of manually decoding the Sqids:


πŸ”— Route Model Binding

The package automatically resolves route model bindings using Sqids. You can define your routes as usual:

In this example, the Invoice model will be resolved using the Sqid provided in the route.


πŸ”’ Generating Numeric IDs

If you need numeric-only Sqids (e.g., 4622014635), configure the package to use a numeric alphabet in the AppServiceProvider's boot method:

This ensures all generated Sqids consist only of numbers.

πŸ”„ Alternatives

If this package doesn’t meet your needs, here are some alternative packages you can explore:

πŸ“œ License

Laravel Sqids was created by Istiak Tridip and is open-sourced under the MIT License.


All versions of laravel-sqids with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^11.0||^12.0||^13.0
illuminate/support Version ^11.0||^12.0||^13.0
sqids/sqids Version ^0.5.0
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 istiak-tridip/laravel-sqids contains the following files

Loading the files please wait ...