Download the PHP package rorecek/laravel-ulid without Composer

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

Laravel ULID

Laravel package to generate ULID (Universally Unique Lexicographically Sortable Identifier), which also contains trait for your models that will let you generate ULID ids for your Eloquent models automatically. Based on robinvdvleuten/php-ulid.

What is a ULID?

In many cases universally unique identifier (UUID) can be suboptimal for many uses-cases because:

Instead, ULID offers:

You can read more here

What are the benefits?

  1. With distributed systems you can be pretty confident that the primary key’s will never collide.

  2. When building a large scale application when an auto increment primary key is not ideal.

  3. It makes replication trivial (as opposed to int’s, which makes it REALLY hard)

  4. Safe enough doesn’t show the user that you are getting information by id, for example https://example.com/item/10

Installation

You can install this package via composer using this command:

Laravel 5.5+

There is nothing else to do as the service provider and facade are going to be automaticaly discovered.

Laravel 5.3 and 5.4

You must install the service provider and facade:

Usage

Migrations

When using the migration you should change $table->increments('id') to:

Simply, the schema seems something like this.

If the related model is using an ULID, the column type should reflect that also.

Models

To set up a model to use ULID, simply use the HasUlid trait.

Controller

When you create a new instance of a model which uses ULIDs, this package will automatically add ULID as id of the model.

Support

If you believe you have found an issue, please report it using the GitHub issue tracker, or better yet, fork the repository and submit a pull request.

If you're using this package, I'd love to hear your thoughts. Thanks!

License

The MIT License (MIT). Pavel Rorecek


All versions of laravel-ulid with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0|^8.0|^8.1
laravel/framework Version ^5.3|^6.0|^7.0|^8.0|^9.0|^10.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 rorecek/laravel-ulid contains the following files

Loading the files please wait ....