From ca41aaa421f68cb0f486767e95cdd97a17434a50 Mon Sep 17 00:00:00 2001 From: Latik Date: Fri, 12 Jan 2018 00:18:02 +0200 Subject: [PATCH 1/2] allow publish assets --- README.md | 6 ++++++ src/Webpatser/Countries/CountriesServiceProvider.php | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 98377a7..7c73f28 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,12 @@ Now add the alias. ] +Publish the public assets: + +``` + php artisan vendor:publish --provider='Webpatser\\Countries\\CountriesServiceProvider' --tag=assets +``` + ## Model You can start by publishing the configuration. This is an optional step, it contains the table name and does not need to be altered. If the default name `countries` suits you, leave it. Otherwise run the following command diff --git a/src/Webpatser/Countries/CountriesServiceProvider.php b/src/Webpatser/Countries/CountriesServiceProvider.php index e16cbfd..149ed0d 100644 --- a/src/Webpatser/Countries/CountriesServiceProvider.php +++ b/src/Webpatser/Countries/CountriesServiceProvider.php @@ -27,6 +27,10 @@ public function boot() // The publication files to publish $this->publishes([__DIR__ . '/../../config/config.php' => config_path('countries.php')]); + $this->publishes([ + __DIR__ . '/../../flags' => public_path('vendor/countries/flags'), + ], 'assets'); + // Append the country settings $this->mergeConfigFrom( __DIR__ . '/../../config/config.php', 'countries' From 2b3f9f0b9f0f2143525658fff35343036f468b69 Mon Sep 17 00:00:00 2001 From: Alex Hoogendoorn Date: Mon, 27 Aug 2018 15:03:30 +1200 Subject: [PATCH 2/2] Fix for issue #101. Added missing currency decimals and symbols. --- src/Webpatser/Countries/Models/countries.json | 45 ++++++++++++++----- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/src/Webpatser/Countries/Models/countries.json b/src/Webpatser/Countries/Models/countries.json index 44fe0e7..8a389ca 100644 --- a/src/Webpatser/Countries/Models/countries.json +++ b/src/Webpatser/Countries/Models/countries.json @@ -1400,7 +1400,9 @@ "region-code":"150", "sub-region-code":"154", "eea":false, - "calling_code":"358" + "calling_code":"358", + "currency_symbol":"\u20ac", + "currency_decimals":"2" }, "250":{ "capital":"Paris", @@ -2874,7 +2876,9 @@ "region-code":"019", "sub-region-code":"029", "eea":false, - "calling_code":"599" + "calling_code":"599", + "currency_symbol":"\u0192", + "currency_decimals":"2" }, "533":{ "capital":"Oranjestad", @@ -2909,7 +2913,9 @@ "region-code":"019", "sub-region-code":"029", "eea":false, - "calling_code":"721" + "calling_code":"721", + "currency_symbol":"\u0192", + "currency_decimals":"2" }, "535":{ "citizenship":"of Bonaire, Sint Eustatius and Saba", @@ -2923,7 +2929,9 @@ "region-code":"019", "sub-region-code":"029", "eea":false, - "calling_code":"599" + "calling_code":"599", + "currency_symbol":"$", + "currency_decimals":"2" }, "540":{ "capital":"Noum\u00e9a", @@ -3528,7 +3536,9 @@ "region-code":"019", "sub-region-code":"029", "eea":false, - "calling_code":"590" + "calling_code":"590", + "currency_symbol":"\u20ac", + "currency_decimals":"2" }, "654":{ "capital":"Jamestown", @@ -3620,7 +3630,9 @@ "region-code":"019", "sub-region-code":"029", "eea":false, - "calling_code":"590" + "calling_code":"590", + "currency_symbol":"\u20ac", + "currency_decimals":"2" }, "666":{ "capital":"Saint-Pierre", @@ -3750,7 +3762,8 @@ "region-code":"150", "sub-region-code":"039", "eea":false, - "calling_code":"381" + "calling_code":"381", + "currency_decimals":"2" }, "690":{ "capital":"Victoria", @@ -3956,7 +3969,8 @@ "region-code":"002", "sub-region-code":"015", "eea":false, - "calling_code":"211" + "calling_code":"211", + "currency_decimals":"2" }, "729":{ "capital":"Khartoum", @@ -3972,7 +3986,8 @@ "region-code":"002", "sub-region-code":"015", "eea":false, - "calling_code":"249" + "calling_code":"249", + "currency_decimals":"2" }, "732":{ "capital":"Al aaiun", @@ -4444,7 +4459,9 @@ "region-code":"150", "sub-region-code":"154", "eea":false, - "calling_code":"44" + "calling_code":"44", + "currency_symbol":"\u00a3", + "currency_decimals":"2" }, "832":{ "capital":"St Helier", @@ -4460,7 +4477,9 @@ "region-code":"150", "sub-region-code":"154", "eea":false, - "calling_code":"44" + "calling_code":"44", + "currency_symbol":"\u00a3", + "currency_decimals":"2" }, "833":{ "capital":"Douglas", @@ -4476,7 +4495,9 @@ "region-code":"150", "sub-region-code":"154", "eea":false, - "calling_code":"44" + "calling_code":"44", + "currency_symbol":"\u00a3", + "currency_decimals":"2" }, "834":{ "capital":"Dodoma (TZ1)",