{"repo":"kra8/laravel-snowflake","free":true,"listed":false,"github":"https://github.com/kra8/laravel-snowflake","clone":"git clone https://github.com/kra8/laravel-snowflake.git","description":"This Laravel package to generate 64 bit identifier like the snowflake within Twitter.","language":"PHP","stars":191,"topics":["snowflake","laravel-snowflake","laravel","lumen-package","php","lumen","laravel-package"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Laravel Snowflake This Laravel package to generate 64 bit identifier like the snowflake within Twitter. Laravel Installation Lumen Installation - Install via composer - Bootstrap file changes Add the following snippet to the bootstrap/app.php file under the providers section as follows: Usage Get instance or Generate snowflake identifier Usage with Eloquent Add the Kra8\\Snowflake\\HasSnowflakePrimary trait to your Eloquent model. This trait make type snowflake of primary key. Trait will automatically set $incrementing property to false. Column type id is supported. JavaScript support Since JavaScript cannot handle 64-bit integers, there is also HasShortPrimary, which creates an ID for a 53-bit integer that can be handled by JavaScript. To use it, simply change HasSnowflakePrimary to HasShortPrimary. Configuration If config/snowflake.php not exist, run below: Licence MIT licence","default_branch":null,"files":null,"tree":[],"storefront":"/r/kra8","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kra8/laravel-snowflake/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}