Skip to content

Generate the invoice number for Laravel Application

License

Notifications You must be signed in to change notification settings

HELMAB/invoice-number

Repository files navigation

Invoice Number for Laravel

Latest Version on Packagist Total Downloads

Generate the invoice number for Laravel application.

Installation

You can install the package via composer:

composer require helmab/invoice-number

Publish invoice-number.php configuration file:

php artisan vendor:publish --provider="Helmab\InvoiceNumber\InvoiceNumberServiceProvider"

Usage

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'
    ];
}

Get Latest Invoice Number

namespace App\Http\Controllers;

use Helmab\InvoiceNumber\InvoiceNumber;

class InvoiceController extends Controller {

    public function getLatestInvoiceNumber()
    {
        return (new InvoiceNumber())->invoiceNumber();
    }
    
}

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email mabhelitc@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Generate the invoice number for Laravel Application

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages