Download the PHP package mucts/laravel-snowflake without Composer
On this page you can find all versions of the php package mucts/laravel-snowflake. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mucts/laravel-snowflake
More information about mucts/laravel-snowflake
Files in mucts/laravel-snowflake
Download mucts/laravel-snowflake
More information about mucts/laravel-snowflake
Files in mucts/laravel-snowflake
Please rate this library. Is it a good library?
Informations about the package laravel-snowflake
Laravel Snowflake
This Laravel package to generate 64 bit identifier like the snowflake within Twitter.
Installation
Server Requirements
you will need to make sure your server meets the following requirements:
php ^7.4
JSON PHP Extension
OpenSSL PHP Extension
GMP PHP Extension
BCMath PHP Extension
laravel/framework ^7.0
Laravel Installation
Usage
Generate snowflake identifier
Analysis snowflake identifier
Usage with Eloquent
Add the MuCTS\LaravelSnowflake\Models\Traits\Snowflake
trait to your Eloquent model.
This trait make type snowflake
of primary key. Trait will automatically set $incrementing property to false.
Finally, in migrations, set the primary key to bigInteger
, unsigned
and primary
.
Configuration
If config/snowflake.php
not exist, run below:
All versions of laravel-snowflake with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.4
ext-json Version ^7.4
ext-openssl Version ^7.4
ext-gmp Version ^7.4
ext-bcmath Version ^7.4
laravel/framework Version ^7.0
ext-json Version ^7.4
ext-openssl Version ^7.4
ext-gmp Version ^7.4
ext-bcmath Version ^7.4
laravel/framework Version ^7.0
The package mucts/laravel-snowflake contains the following files
Loading the files please wait ....