PHP code example of lyrasoft / sequence

1. Go to this page and download the library: Download lyrasoft/sequence 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/ */

    

lyrasoft / sequence example snippets


// ...

    'providers' => [
        \Lyrasoft\Sequence\SequencePackage::class
    ],

// ...

$sequenceServcie = $app->service(\Lyrasoft\Sequence\Service\SequenceService::class);

$serial = $sequenceServcie->getNextSerial('order', 'FN-'); // 15
$serial = $sequenceServcie->getNextSerialAndPadZero('order', 'FN-', 7); // 0000015
$serial = $sequenceServcie->getNextSerialWithPrefix('order', 'FN-', 7); // FN-0000015
shell
php windwalker pkg:install lyrasoft/sequence -t migrations