helmab / invoice-number
Generate invoice number for the Laravel Application
v1.0.0
2022-04-30 05:46 UTC
Requires
- php: ^7.1|^7.4|^8.0
- illuminate/support: ^5.0 || ^6.0 || ^7.0 || ^8.0
This package is auto-updated.
Last update: 2024-10-29 06:25:30 UTC
README
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.