Download the PHP package pelmered/laravel-ulid without Composer

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

This package improves the ULID support in Laravel with the following features:

ULIDs - What and why

ULIDs are a compact, time-ordered, globally unique identifier that are used to identify resources in a way that is both human-readable and machine-readable.

For a more in-depth technical explanation, see the ULID specification

One of my personal favorite things about ULIDs is that you can double-click on them to select and copy. Try to select and copy these IDs: u_01ARZ3NDEKTSV4RRFFQ69G5FAVY and 4f839b45-fcca-495b-b9ed-0e365270b1c3. The prefixes also makes it immediately clear what kind of ID it is when you see it.

This is great when you are passing IDs around to colleagues or coworkers when debugging or working with support. The hyphens also look pretty ugly and do not have any real meaning for a human.


Latest Stable Version License

Tests OtterWise Coverage OtterWise Type Coverage

Tested on PHP 8.4 Tested on OS:es Linux, MacOS, Windows

TODO

Roadmap

Installation

Setup

Add the interface Ulidable and the trait HasUlid to your model.

Configuration

You can configure the ULID prefix, time length and random length in the model.

You probably shouldn't touch the time length unless you know what you are doing.\ The Random part could be optimized based on your needs. A low traffic application could probably use a shorter random part to optimize storage space and performance.

Usage (Work in progress)

Migrations

To create a ULID column in a migration, you can use the ulid or modelULid methods like this to get the correct length.

Facade

Formatting

Config

Publish the config file config/ulid.php to your project.

Running tests

Run the test with vendor/bin/pest or composer test.

The test suite has some tests that require a MySQL database. To run these tests, you need to create a .env file in the root of the project with the following contents, adjusted for your setup:

You can also skip the MySQL tests the tests by running vendor/bin/pest --exclude-group=mysql.


All versions of laravel-ulid with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
lewiscowles/ulid Version ^1.3.1
illuminate/support Version ^11.30|^12.0
php-static-analysis/attributes Version ^0.3.1|^0.4.0
nesbot/carbon Version ^3.8.4|^4.0
ext-bcmath Version *
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 pelmered/laravel-ulid contains the following files

Loading the files please wait ....