PHP code example of omaressaouaf / laravel-id-generator
1. Go to this page and download the library: Download omaressaouaf/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/ */
omaressaouaf / laravel-id-generator example snippets
use Omaressaouaf\LaravelIdGenerator\IdGenerator;
use App\Models\User;
$id = IdGenerator::generate(Invoice::class, 'column_name', 5, 'INV-', '-2024');
echo $id; // INV-00001-2024