From 4e302973ff0b0e5784cda08a84d41ba8be81ed86 Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Sat, 9 Apr 2016 17:07:50 +0200 Subject: [PATCH] Add Validator method examples to README --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f0d2896b85..ec066424ad 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,19 @@ You can register the VatRates facade in the `aliases` key of your `config/app.ph ## Usage -If you registered the facade then using an instance of the class is as easy as this. +If you registered the facade then using instance of the classs is as easy as this. ```php use DvK\Laravel\Vat\Facades\Rates; Rates::country( 'NL' ); // 21 Rates::country( 'NL', 'reduced' ); // 6 +Rates:all(); // array in country code => rates format + +Validator::isEuCountry('NL'); // true +Validator::check('NL50123'); // false +Validator::check('NL203458239B01'); // true (if this were really a valid VAT #) + ``` If you'd prefer to use dependency injection, you can easily inject the class like this.