Skip to content

Commit

Permalink
Bumped Laravel and phpunit versions
Browse files Browse the repository at this point in the history
  • Loading branch information
sandervanhooft committed Mar 20, 2018
1 parent 2df1227 commit 6c52210
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
## 2017-06-21
- First release

## 2018-03-20
### Fixed
- Laravel and phpunit version bumps

## NEXT - YYYY-MM-DD

### Added
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Build Status][ico-travis]][link-travis]
[![Total Downloads][ico-downloads]][link-downloads]

Easy invoice creation for Laravel 5.4 applications. Unlike Laravel Cashier, this package is payment gateway agnostic.
Easy invoice creation for Laravel 5.4 and up. Unlike Laravel Cashier, this package is payment gateway agnostic.

If you're looking for Mollie payment processing, be sure to check out [laravel-payable-redirect-mollie](https://github.com/sandervanhooft/laravel-payable-redirect-mollie).

Expand All @@ -27,7 +27,7 @@ Via Composer
$ composer require sander-van-hooft/laravel-invoicable
```

Next, you must install the service provider:
Next, you must install the service provider if you work with Laravel 5.4:

``` php
// config/app.php
Expand Down Expand Up @@ -92,6 +92,7 @@ class Order extends Model
```

Now you can create invoices for an Order:

``` php
$order = new Order();
$invoice = $order->invoices()->create([]);
Expand Down Expand Up @@ -124,8 +125,16 @@ $invoice->lines();
// Access as pdf
$invoice->download(); // download as pdf (returns http response)
$invoice->pdf(); // or just grab the pdf (raw bytes)

// Handling discounts
// By adding a line with a negative amount.
$invoice = $invoice->addAmountInclTax(-121, 'A nice discount', 0.21);

// Or by applying the discount and discribing the discount manually
$invoice = $invoice->addAmountInclTax(121 * (1 - 0.30), 'Product XYZ incl 30% discount', 0.21);
```


## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
"php": "~5.6|~7.0",
"ext-intl": "*",
"dompdf/dompdf": "^0.8.0",
"illuminate/support": "~5.1",
"illuminate/support": "~5.1|~5.2|~5.3|~5.4|~5.5|~5.6",
"nesbot/carbon": "^1.22"
},
"require-dev": {
"graham-campbell/testbench": "^3.3",
"mockery/mockery": "^0.9.9",
"orchestra/database": "^3.4",
"phpunit/phpunit" : "~4.0||~5.0||~6.0",
"phpunit/phpunit" : "~4.0||~5.0||~6.0||~7.0",
"squizlabs/php_codesniffer": "^2.3"
},
"autoload": {
Expand Down

0 comments on commit 6c52210

Please sign in to comment.