You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# Everything You Need to Manage Invoices in Laravel
2
2
3
-
[](https://packagist.org/packages/finller/laravel-invoices)
[](https://packagist.org/packages/elegantly/laravel-invoices)
This package provides a robust, easy-to-use system for managing invoices within a Laravel application, with options for database storage, serial numbering, and PDF generation.
9
9
@@ -51,7 +51,7 @@ Try out [the interactive demo](https://elegantengineering.tech/laravel-invoices)
This is the contents of the published config file:
71
71
72
72
```php
73
-
use Finller\Invoice\Models\Invoice;
74
-
use Finller\Invoice\InvoiceDiscount;
75
-
use Finller\Invoice\Models\InvoiceItem;
76
-
use Finller\Invoice\Enums\InvoiceType;
73
+
use Elegantly\Invoices\Models\Invoice;
74
+
use Elegantly\Invoices\InvoiceDiscount;
75
+
use Elegantly\Invoices\Models\InvoiceItem;
76
+
use Elegantly\Invoices\Enums\InvoiceType;
77
77
78
78
return [
79
79
@@ -193,7 +193,7 @@ return [
193
193
194
194
### Storing an Invoice in Your Database
195
195
196
-
You can store an Invoice in your database using the Eloquent Model: `Finller\Invoice\Models\Invoice`.
196
+
You can store an Invoice in your database using the Eloquent Model: `Elegantly\Invoices\Models\Invoice`.
197
197
198
198
> [!NOTE]
199
199
> Don't forget to publish and run the migrations
@@ -202,9 +202,9 @@ Here is a full example:
202
202
203
203
```php
204
204
use Brick\Money\Money;
205
-
use Finller\Invoice\Models\Invoice;
206
-
use Finller\Invoice\Enums\InvoiceState;
207
-
use Finller\Invoice\Enums\InvoiceType;
205
+
use Elegantly\Invoices\Models\Invoice;
206
+
use Elegantly\Invoices\Enums\InvoiceState;
207
+
use Elegantly\Invoices\Enums\InvoiceType;
208
208
209
209
// Let's say your app edit invoices for your users
210
210
$customer = User::find(1);
@@ -256,7 +256,7 @@ You can configure the format of your serial numbers in the configuration file. T
256
256
257
257
When `invoices.serial_number.auto_generate` is set to `true`, a unique serial number is assigned to each new invoice automatically.
258
258
259
-
Serial numbers are generated sequentially, with each new serial number based on the latest available one. To define what qualifies as the `previous` serial number, you can extend the `Finller\Invoice\Models\Invoice` class and override the `getPreviousInvoice` method.
259
+
Serial numbers are generated sequentially, with each new serial number based on the latest available one. To define what qualifies as the `previous` serial number, you can extend the `Elegantly\Invoices\Models\Invoice` class and override the `getPreviousInvoice` method.
260
260
261
261
By default, the previous invoice is determined based on criteria such as prefix, series, year, and month for accurate, scoped numbering.
262
262
@@ -273,7 +273,7 @@ For instance, you might want to define a unique series for each user, creating s
273
273
When creating an invoice, you can dynamically specify the prefix and series as follows:
274
274
275
275
```php
276
-
use Finller\Invoice\Models\Invoice;
276
+
use Elegantly\Invoices\Models\Invoice;
277
277
$invoice = new Invoice();
278
278
279
279
$invoice->configureSerialNumber(
@@ -380,7 +380,7 @@ class PaymentInvoice extends Mailable
380
380
381
381
To customize how your model is converted to a `PdfInvoice`, follow these steps:
382
382
383
-
1.**Create a Custom Model**: Define your own `\App\Models\Invoice` class and ensure it extends the base `\Finller\Invoice\Models\Invoice` class.
383
+
1.**Create a Custom Model**: Define your own `\App\Models\Invoice` class and ensure it extends the base `\Elegantly\Invoices\Models\Invoice` class.
384
384
385
385
2.**Override the `toPdfInvoice` Method**: Implement your specific logic within the `toPdfInvoice` method to control the customization.
386
386
@@ -399,7 +399,7 @@ If you need to set the logo dynamically on the invoice, for example, when allowi
399
399
To dynamically set the logo, define the `getLogo` method as shown below:
400
400
401
401
```php
402
-
class Invoice extends \Finller\Invoice\Models\Invoice
402
+
class Invoice extends \Elegantly\Invoices\Models\Invoice
403
403
{
404
404
// ...
405
405
@@ -426,7 +426,7 @@ You can even use this package exclusively for the `PdfInvoice` class if that sui
426
426
Here’s an example of a fully configured `PdfInvoice` instance:
427
427
428
428
```php
429
-
use Finller\Invoice\Pdf\PdfInvoice;
429
+
use Elegantly\Invoices\Pdf\PdfInvoice;
430
430
431
431
$pdfInvoice = new PdfInvoice(
432
432
name: "Invoice",
@@ -480,7 +480,7 @@ $pdfInvoice = new PdfInvoice(
480
480
```php
481
481
namespace App\Http\Controllers;
482
482
483
-
use Finller\Invoice\Pdf\PdfInvoice;
483
+
use Elegantly\Invoices\Pdf\PdfInvoice;
484
484
485
485
class InvoiceController extends Controller
486
486
{
@@ -519,7 +519,7 @@ class InvoiceController extends Controller
0 commit comments