Skip to content

Commit f2bb066

Browse files
Merge pull request #1 from subhashladumor1/dev
init
2 parents 66bb4d3 + 699c3a0 commit f2bb066

23 files changed

+1714
-2
lines changed

CONTRIBUTING.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contributing to Laravel InvoiceLite
2+
3+
First off, thanks for taking the time to contribute! 🎉
4+
5+
## How Can I Contribute?
6+
7+
### Reporting Bugs
8+
9+
Before creating bug reports, please check the existing issues as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
10+
11+
- Use a clear and descriptive title
12+
- Describe the exact steps which reproduce the problem
13+
- Provide specific examples to demonstrate the steps
14+
- Describe the behavior you observed after following the steps
15+
- Explain which behavior you expected to see instead and why
16+
17+
### Suggesting Enhancements
18+
19+
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
20+
21+
- Use a clear and descriptive title
22+
- Provide a step-by-step description of the suggested enhancement
23+
- Provide specific examples to demonstrate the steps
24+
- Describe the current behavior and explain which behavior you expected to see instead
25+
26+
### Pull Requests
27+
28+
- Fill in the required template
29+
- Include screenshots and animated GIFs in your pull request whenever possible
30+
- Follow the PSR-12 coding standards
31+
- Include unit tests in your pull request
32+
- Document new code based on existing code style
33+
34+
## Coding Standards
35+
36+
- Follow PSR-12 coding standards
37+
- Use meaningful variable and function names
38+
- Comment your code where necessary
39+
- Write unit tests for new functionality
40+
41+
## License
42+
43+
By contributing to Laravel InvoiceLite, you agree that your contributions will be licensed under its MIT license.

README.md

Lines changed: 208 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,208 @@
1-
# laravel-invoicelite
2-
💸 Laravel-InvoiceLite — Advanced, multi-country 🌍, multi-language 🗣️ & multi-template 🎨 invoice generator for Laravel 10+ ⚙️. Generate, export (PDF 📄/Image 🖼️), share 🔗, email 📧, and auto-convert currencies 💱 — lightning-fast ⚡, developer-friendly 💻 & 100 % customizable 🚀
1+
# Laravel InvoiceLite 🧾
2+
3+
💼 **Laravel InvoiceLite** — Multi-language, multi-country, professional invoice generator with PDF/Image export, templates, taxes & sharing 🚀
4+
5+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/subhashladumor1/laravel-invoicelite.svg?style=flat-square)](https://packagist.org/packages/subhashladumor1/laravel-invoicelite)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/subhashladumor1/laravel-invoicelite.svg?style=flat-square)](https://packagist.org/packages/subhashladumor1/laravel-invoicelite)
7+
[![License](https://img.shields.io/packagist/l/subhashladumor1/laravel-invoicelite.svg?style=flat-square)](https://github.com/subhashladumor1/laravel-invoicelite/blob/main/LICENSE)
8+
9+
---
10+
11+
## 🎯 Introduction
12+
13+
**Laravel InvoiceLite** is a modern, advanced, multi-language 🌍, multi-country 🌎 invoice generator for Laravel applications. It allows developers to quickly generate, customize, export, share, and email invoices with support for multiple countries, languages, and templates.
14+
15+
This package is built for Laravel 10+ and provides a clean, developer-friendly API to generate professional invoices with minimal setup.
16+
17+
---
18+
19+
## ⚡ Features
20+
21+
- 🧮 **Dynamic Invoice Generation** - From arrays, models, or JSON data
22+
- 🌍 **Multi-language Support** - English, French, German, Hindi and more
23+
- 🌐 **Multi-country Tax Systems** - GST, VAT, Sales Tax, etc.
24+
- 🧱 **Pre-built Templates** - Modern, Classic, Minimal designs
25+
- 💾 **Multiple Export Formats** - PDF, Image (PNG/JPEG), HTML
26+
- 📤 **Shareable Links** - Unique signed URLs for invoice sharing
27+
- 🎨 **Custom Branding** - Logo, color, header/footer customization
28+
- 💬 **Localized Templates** - Multi-language using JSON translations
29+
- 💡 **Developer-Friendly** - Single function helper for quick generation
30+
- ⚙️ **Performance Optimized** - Caching and optimization built-in
31+
- 🧑‍💻 **Well Documented** - Comprehensive examples and documentation
32+
33+
---
34+
35+
## 🧩 Installation
36+
37+
You can install the package via composer:
38+
39+
```bash
40+
composer require subhashladumor1/laravel-invoicelite
41+
```
42+
43+
---
44+
45+
## ⚙️ Publish Configuration
46+
47+
Publish the configuration file to customize the package behavior:
48+
49+
```bash
50+
php artisan vendor:publish --tag=invoicelite-config
51+
```
52+
53+
Publish language files for customization:
54+
55+
```bash
56+
php artisan vendor:publish --tag=invoicelite-lang
57+
```
58+
59+
Publish template files for customization:
60+
61+
```bash
62+
php artisan vendor:publish --tag=invoicelite-templates
63+
```
64+
65+
---
66+
67+
## 🧾 Usage Example
68+
69+
```php
70+
use SubhashLadumor1\InvoiceLite\Facades\InvoiceLite;
71+
72+
$data = [
73+
'invoice_no' => 'INV-2025-001',
74+
'customer' => ['name' => 'John Doe', 'email' => 'john@example.com'],
75+
'items' => [
76+
['name' => 'Web Development', 'price' => 1200, 'qty' => 1],
77+
['name' => 'Hosting', 'price' => 100, 'qty' => 12],
78+
],
79+
'tax' => 18,
80+
'currency' => 'INR',
81+
'language' => 'en'
82+
];
83+
84+
InvoiceLite::make($data)
85+
->template('modern')
86+
->currency('INR')
87+
->export('pdf')
88+
->save(storage_path('invoices/invoice.pdf'));
89+
```
90+
91+
---
92+
93+
## 🌐 Multi-language Example
94+
95+
```php
96+
InvoiceLite::make($data)
97+
->language('fr') // French
98+
->template('modern')
99+
->export('pdf')
100+
->save(storage_path('invoices/invoice-fr.pdf'));
101+
```
102+
103+
Supported languages:
104+
- English (`en`)
105+
- French (`fr`)
106+
- German (`de`)
107+
- Hindi (`hi`)
108+
109+
---
110+
111+
## 🌎 Multi-country Tax Example
112+
113+
```php
114+
$taxCalculator = new \SubhashLadumor1\InvoiceLite\Services\TaxCalculator();
115+
116+
// Get tax rules for India
117+
$indiaTax = $taxCalculator->getCountryTaxRules('IN'); // ['name' => 'GST', 'rate' => 18.0]
118+
119+
// Get tax rules for United States
120+
$usTax = $taxCalculator->getCountryTaxRules('US'); // ['name' => 'Sales Tax', 'rate' => 7.5]
121+
122+
// Use in invoice generation
123+
InvoiceLite::make($data)
124+
->template('modern')
125+
->export('pdf')
126+
->save(storage_path('invoices/invoice-with-tax.pdf'));
127+
```
128+
129+
---
130+
131+
## 🎨 Template Customization Guide
132+
133+
The package comes with three built-in templates:
134+
1. **Modern** - Clean, gradient design with modern aesthetics
135+
2. **Classic** - Traditional invoice layout with borders
136+
3. **Minimal** - Simple, minimalist design
137+
138+
To customize templates:
139+
1. Publish the templates:
140+
```bash
141+
php artisan vendor:publish --tag=invoicelite-templates
142+
```
143+
2. Edit the templates in `resources/views/vendor/invoicelite/`
144+
145+
---
146+
147+
## 📤 Invoice Share Link Example
148+
149+
Generate a shareable link for an invoice:
150+
151+
```php
152+
$link = InvoiceLite::generateShareLink('INV-2025-001', now()->addDays(7)); // Expires in 7 days
153+
154+
// Or use default expiration (30 days)
155+
$link = InvoiceLite::generateShareLink('INV-2025-001');
156+
```
157+
158+
---
159+
160+
## ⚙️ Configuration Options
161+
162+
The configuration file allows you to customize:
163+
164+
```php
165+
return [
166+
'default_template' => 'modern',
167+
'default_currency' => 'USD',
168+
'default_language' => 'en',
169+
'supported_currencies' => ['USD', 'EUR', 'GBP', 'INR', 'JPY', 'CAD', 'AUD', 'CHF', 'CNY', 'SEK'],
170+
'supported_languages' => ['en', 'fr', 'de', 'hi'],
171+
'supported_templates' => ['modern', 'classic', 'minimal'],
172+
'company' => [
173+
'name' => 'Your Company Name',
174+
'address' => '123 Main Street, City, Country',
175+
'email' => 'info@yourcompany.com',
176+
'phone' => '+1 234 567 8900',
177+
'website' => 'https://yourcompany.com',
178+
'logo' => '', // Path to your logo
179+
],
180+
// ... more options
181+
];
182+
```
183+
184+
---
185+
186+
## 🧩 Contributing
187+
188+
Contributions are welcome! Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
189+
190+
---
191+
192+
## 🪪 License
193+
194+
The MIT License (MIT). Please see [License File](LICENSE) for more information.
195+
196+
---
197+
198+
## 🙏 Acknowledgements
199+
200+
- [barryvdh/laravel-dompdf](https://github.com/barryvdh/laravel-dompdf) - For PDF generation
201+
- [intervention/image](https://github.com/Intervention/image) - For image processing
202+
- All contributors who have helped shape this package
203+
204+
---
205+
206+
## 📧 Contact
207+
208+
For support or feature requests, please [open an issue](https://github.com/subhashladumor1/laravel-invoicelite/issues) on GitHub.

composer.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "subhashladumor1/laravel-invoicelite",
3+
"description": "💼 Laravel InvoiceLite — Multi-language, multi-country, professional invoice generator with PDF/Image export, templates, taxes & sharing 🚀",
4+
"type": "library",
5+
"license": "MIT",
6+
"autoload": {
7+
"psr-4": {
8+
"SubhashLadumor1\\InvoiceLite\\": "src/"
9+
},
10+
"files": [
11+
"src/Helpers/InvoiceHelper.php"
12+
]
13+
},
14+
"extra": {
15+
"laravel": {
16+
"providers": [
17+
"SubhashLadumor1\\InvoiceLite\\Providers\\InvoiceLiteServiceProvider"
18+
],
19+
"aliases": {
20+
"InvoiceLite": "SubhashLadumor1\\InvoiceLite\\Facades\\InvoiceLite"
21+
}
22+
}
23+
},
24+
"require": {
25+
"php": ">=8.1",
26+
"illuminate/support": "^10.0|^11.0",
27+
"barryvdh/laravel-dompdf": "^2.0",
28+
"intervention/image": "^3.0"
29+
}
30+
}

0 commit comments

Comments
 (0)