PHP code example of helmab / invoice-number

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

    

helmab / invoice-number example snippets



use Helmab\InvoiceNumber\Traits\HasInvoiceNumber;
use Illuminate\Database\Eloquent\Model;

class Invoice extends Model {

    use HasInvoiceNumber;

    protected $invoice_number_column = 'invoice_number';

    protected $fillable = [
        'invoice_number'
    ];
}

namespace App\Http\Controllers;

use Helmab\InvoiceNumber\InvoiceNumber;

class InvoiceController extends Controller {

    public function getLatestInvoiceNumber()
    {
        return (new InvoiceNumber())->invoiceNumber();
    }
    
}
bash
php artisan vendor:publish --provider="Helmab\InvoiceNumber\InvoiceNumberServiceProvider"