No description, website, or topics provided.
PHP
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config Enable strict types Aug 3, 2017
resources/views Some dependency changes Jun 5, 2017
src Apply fixes from StyleCI (#9) Feb 12, 2018
tests fix tests Feb 6, 2018
.editorconfig editorconfig Aug 3, 2017
.gitattributes gitattributes Aug 3, 2017
.gitignore first commit Apr 20, 2017
.travis.yml first commit Apr 20, 2017
LICENSE update deps Jan 29, 2018
README.md update readme Feb 16, 2018
composer.json update deps Feb 4, 2018
phpunit.xml.dist first commit Apr 20, 2017

README.md

Laravel Invoice

Build Status PHP from Packagist Latest Version License

Installation

Require this package, with Composer, in the root directory of your project.

$ composer require faustbrian/laravel-invoice

Usage

$faker = faker();

$vendor = new Vendor([
    'name' => $faker->name,
    'address' => $faker->streetAddress,
    'city' => $faker->city,
    'country' => $faker->country,
    'phone' => $faker->phoneNumber,
    'email' => $faker->email,
]);

$owner = new Owner([
    'name' => $faker->name,
    'address' => $faker->streetAddress,
    'city' => $faker->city,
    'country' => $faker->country,
    'phone' => $faker->phoneNumber,
    'email' => $faker->email,
]);

$products = new ProductCollection([
    [
        'sku' => '5168834966240078',
        'name' => 'Kristoffer Brown',
        'quantity' => 1,
        'unit_price' => '92,10 €',
        'total' => '92,10 €',
    ]
]);

$transaction = new Transaction([
    'id' => $faker->word,
    'subtotal' => 9210,
    'discount' => 0,
    'delivery' => 350,
    'tax' => 0,
    'total' => 9560,
    'created_at' => Carbon\Carbon::now(),
]);

$invoice = new Invoice($vendor, $owner, $products, $transaction);
$invoice->useLocale('en_US');
$invoice->useCurrency('USD');
$invoice->useView('receipt');

$invoice->view();
// $invoice->download();

Testing

$ phpunit

Security

If you discover a security vulnerability within this package, please send an e-mail to hello@brianfaust.me. All security vulnerabilities will be promptly addressed.

Credits

License

MIT © Brian Faust