Skip to content
No description, website, or topics provided.
PHP
Branch: master
Clone or download
Latest commit eeb8f2b Oct 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config transfer ownership to artisanry Jun 4, 2019
resources/views Some dependency changes Jun 5, 2017
src transfer ownership to artisanry Jun 4, 2019
tests transfer ownership to artisanry Jun 4, 2019
.editorconfig editorconfig Aug 3, 2017
.gitattributes gitattributes Aug 3, 2017
.gitignore
.travis.yml first commit Apr 20, 2017
LICENSE MPL 2.0 Jun 9, 2019
README.md MPL 2.0 Jun 9, 2019
composer.json Laravel 6 Aug 28, 2019
phpunit.xml.dist first commit Apr 20, 2017
renovate.json Update renovate.json Oct 6, 2019

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 artisanry/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@basecode.sh. All security vulnerabilities will be promptly addressed.

Credits

This project exists thanks to all the people who contribute.

License

Mozilla Public License Version 2.0 (MPL-2.0).

You can’t perform that action at this time.