Download the PHP package elfsundae/laravel-hashid without Composer

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

Laravel Hashid

Latest Version on Packagist tests StyleCI SymfonyInsight Grade Quality Score Code Coverage Total Downloads

Laravel Hashid provides a unified API across various drivers such as Base62, Base64, Hashids and Optimus, with support for multiple connections or different encoding options. It offers a simple, elegant way to obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.

Installation

You can install this package using the Composer manager:

For Lumen or earlier Laravel than v5.5, you need to register the service provider manually:

Then publish the configuration file:

Configuration

Our well documented configuration file is extremely similar to the configurations of numerous Laravel manager integrations such as Database, Queue, Cache and Filesystem. So you do not need to spend extra time to learn how to configure Hashid.

Additionally, for simplicity you do not need to add singleton drivers like Base64 to your config file as they have no encoding options, unless you would like to specify a meaningful connection name.

Let's see an example of the configuration:

Usage

The hashid() helper or the Hashid facade may be used to interact with any of your configured connections or drivers:

There are only two methods you need to know to use any connection or driver:

And there are also two corresponding helper functions:

Built-in Drivers

Base62

Base64

Hashids

Hex

Optimus

Custom Drivers

To create a custom Hashid driver, you only need to implement the ElfSundae\Laravel\Hashid\DriverInterface interface that contains two methods: encode and decode. The constructor can optionally receive the driver configuration from a $config argument, and type-hinted dependencies injection is supported as well:

Now you can configure the connection with this driver:

If you prefer a short name for your driver, just register a container binding with hashid.driver. prefix:

Testing

License

This package is open-sourced software licensed under the MIT License.


All versions of laravel-hashid with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
illuminate/support Version ^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/console Version ^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
tuupola/base62 Version ^2.0
elfsundae/urlsafe-base64 Version ^1.1
hashids/hashids Version ^2.0.4|^3.0|^4.0|^5.0
jenssegers/optimus Version ^1.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 elfsundae/laravel-hashid contains the following files

Loading the files please wait ....