PHP code example of mariuszmalek / unique-number-generator
1. Go to this page and download the library: Download mariuszmalek/unique-number-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/ */
mariuszmalek / unique-number-generator example snippets
$post->number = GeneratorNumber::generateID(Post::class, 'number', 'CLI-', $params);
use Malek\UniqueNumberGenerator\Numerable;
class Product extends Model
{
use Numerable;
/**
* @return string
*/
public function uniqueColumn(): string
{
return 'number';
}
}
sh
php artisan vendor:publish --provider="Malek\UniqueNumberGenerator\ServiceProvider"