PHP code example of yeeraf / laravel-document-numberer

1. Go to this page and download the library: Download yeeraf/laravel-document-numberer 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/ */

    

yeeraf / laravel-document-numberer example snippets


composer 

$documentNumberer = new \Yeeraf\DocumentNumberer\DocumentNumberer;
$docNumber = $documentNumberer->generate();

// ใบแจ้งหนี้
$documentNumberer = new \Yeeraf\DocumentNumberer\DocumentNumberer;
$docNumber = $documentNumberer->name("invoice")->generate();

// ใบเสร็จรับเงิน
$documentNumberer = new \Yeeraf\DocumentNumberer\DocumentNumberer;
$docNumber = $documentNumberer->name("receipt")->generate();

$documentNumberer = new \Yeeraf\DocumentNumberer\DocumentNumberer;
$docNumber = $documentNumberer
                ->prefix("INV-")
                ->padLength(3)
                ->padString("#")
                ->suffix("-X")
                ->generate();
bash
php artisan migrate