PHP code example of jakyeru / snowflake

1. Go to this page and download the library: Download jakyeru/snowflake library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jakyeru / snowflake example snippets


resolve('snowflake')->id(); // ---> 112871594573041664



namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Jakyeru\Snowflake\Traits\HasSnowflakes;

class User extends Authenticatable
{
    use HasSnowflakes;
}
shell
php artisan vendor:publish --tag=snowflake-config