PHP code example of lyntom / laravel-id-generator

1. Go to this page and download the library: Download lyntom/laravel-id-generator 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/ */

    

lyntom / laravel-id-generator example snippets


use Lyntom\LaravelIdGenerator\Facades\IdGenerator;

$id = IdGenerator::generate([
 'table'=>'name_table',
 'field'=>'field_id_custom',
 'prefix'=>'ID or something',
 'date_format'=>'y',
 'padding'=>4,
]);