Download the PHP package cirlmcesc/laravel-hashids without Composer

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

Laravel Hashids

Latest Stable Version Total Downloads License PHP Version Require


TL;DR

Do not explicitly display the ID of the data in the interface or URI. Use the Trail on the Model to automatically encrypt the ID, and at the same time, it will correctly decrypt the instance of the class you want to inject into the route. It also provides quick methods to encrypt and decrypt the ID when you need. It provides some commands for testing. Inspired by vinkla/hashids.


Getting started

Install via composer

Require this package, with Composer, in the root directory of your project.

Configuration file

Artisan command will be published to config/. The mode of operation can be customized by modifying parameters and attributes.


Usage

Use on Model

Use Model trait, you can use it quickly. Using trait on the model, you can quickly use it to automatically encrypt the ID when the model is serialized and the value of the field set by . It is also possible to not set this property and all fields ends with will be automatically encrypted.You can choose to set the property to prevent these fields from being encrypted. However, and are mutually exclusive. If both are set, an exception will be thrown when the model is serialized into an array. Of course, you can also choose to set the property to determine whether to encrypt only the ID field. If additional fields need to be encrypted and the field does not end with , then it is necessary to set to all fields ending with plus the fields that require additional encryption Only in this way can it work properly.

Use on Route

When injecting the model ID into routing or controller operations, it will automatically decode the ID. No additional action is required.

Use on Resource Class

When you use resource classes, model serialization does not go through Model Trait, so you need to encrypt the ID in the method of the resource class.The usage method allows for batch encryption of ID fields.

Use functions elsewhere

Quickly encrypt and decrypt. Some functions are provided.

Test command Artisan command can use encryption and decryption on the command line.


All versions of laravel-hashids with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
hashids/hashids Version ^5.0
illuminate/support Version ^11.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 cirlmcesc/laravel-hashids contains the following files

Loading the files please wait ....