Current Version:1.1
Laravel Version:5.X
PHP Version:>5.4
Invoices Generate PDF invoices for your customers in laravel. Github Page

# Installation

# Require the package

To install the package you'll need to use composer. So simply copy and paste the following code in your terminal, while you're in the laravel application directory.

composer require consoletvs/invoices

# Service Provider

If you're using Laravel 5.5 or higher you may skip this step.

We need a way to tell Laravel that invoices is there, the way to go is to register the service provider in the application configuration. To do such, you'll need to go to the config/app.php file and add the following line in the providers array:

ConsoleTVs\Invoices\InvoicesServiceProvider::class,

# Publish the configuration

This is one of this optional steps, but it's recommended if you wish to tweak the invoices configuration. Simply type the following command in the terminal while you're in the application directory.

php artisan vendor:publish --tag=invoices

# Usage

# Complete sample usage

$invoice = ConsoleTVs\Invoices\Classes\Invoice::make()
 ->addItem('Test Item', 10.25, 2, 1412)
 ->addItem('Test Item 2', 5, 2, 923)
 ->addItem('Test Item 3', 15.55, 5, 42)
 ->addItem('Test Item 4', 1.25, 1, 923)
 ->addItem('Test Item 5', 3.12, 1, 3142)
 ->addItem('Test Item 6', 6.41, 3, 452)
 ->addItem('Test Item 7', 2.86, 1, 1526)
 ->number(4021)
 ->tax(21)
 ->notes('Lrem ipsum dolor sit amet, consectetur adipiscing elit.')
 ->customer([
  'name' => 'Èrik Campobadal Forés',
  'id' => '12345678A',
  'phone' => '+34 123 456 789',
  'location' => 'C / Unknown Street 1st',
  'zip' => '08241',
  'city' => 'Manresa',
  'country' => 'Spain',
 ])
 ->download('demo');

# Complete sample result

© 2018 Èrik Campobadal. All rights reserved.