Skip to content

Commit a88c3db

Browse files
committed
First version
1 parent 3e5bdbb commit a88c3db

10 files changed

+9393
-27
lines changed

README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
# Very short description of the package
1+
# Laravel WooCommerce Locations
22

3-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/rubloge/laravel-wc-locations.svg?style=flat-square)](https://packagist.org/packages/rubloge/laravel-wc-locations)
4-
[![Total Downloads](https://img.shields.io/packagist/dt/rubloge/laravel-wc-locations.svg?style=flat-square)](https://packagist.org/packages/rubloge/laravel-wc-locations)
5-
![GitHub Actions](https://github.com/rubloge/laravel-wc-locations/actions/workflows/main.yml/badge.svg)
6-
7-
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
3+
List of Continents, Countries and States appearing on WooCommerce codebase for
4+
being consumed in Laravel.
85

96
## Installation
107

composer.json

+8-15
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "rubloge/laravel-wc-locations",
33
"description": "List Countries and States using WooCommerce data",
44
"keywords": [
5-
"rubloge",
5+
"laravel",
6+
"woocommerce",
7+
"countries",
8+
"states",
9+
"locations",
610
"laravel-wc-locations"
711
],
812
"homepage": "https://github.com/rubloge/laravel-wc-locations",
@@ -19,25 +23,11 @@
1923
"php": "^7.4|^8.0",
2024
"illuminate/support": "^8.0"
2125
},
22-
"require-dev": {
23-
"orchestra/testbench": "^6.0",
24-
"phpunit/phpunit": "^9.0"
25-
},
2626
"autoload": {
2727
"psr-4": {
2828
"Rubloge\\LaravelWcLocations\\": "src"
2929
}
3030
},
31-
"autoload-dev": {
32-
"psr-4": {
33-
"Rubloge\\LaravelWcLocations\\Tests\\": "tests"
34-
}
35-
},
36-
"scripts": {
37-
"test": "vendor/bin/phpunit",
38-
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
39-
40-
},
4131
"config": {
4232
"sort-packages": true
4333
},
@@ -50,5 +40,8 @@
5040
"LaravelWcLocations": "Rubloge\\LaravelWcLocations\\LaravelWcLocationsFacade"
5141
}
5242
}
43+
},
44+
"require-dev": {
45+
"laravel/pint": "^1.13"
5346
}
5447
}

resources/data/continents.php

+295
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,295 @@
1+
<?php
2+
3+
return [
4+
'AF' => [
5+
'key' => 'AF',
6+
'name' => 'Africa',
7+
'countries' => [
8+
'AO',
9+
'BF',
10+
'BI',
11+
'BJ',
12+
'BW',
13+
'CD',
14+
'CF',
15+
'CG',
16+
'CI',
17+
'CM',
18+
'CV',
19+
'DJ',
20+
'DZ',
21+
'EG',
22+
'EH',
23+
'ER',
24+
'ET',
25+
'GA',
26+
'GH',
27+
'GM',
28+
'GN',
29+
'GQ',
30+
'GW',
31+
'KE',
32+
'KM',
33+
'LR',
34+
'LS',
35+
'LY',
36+
'MA',
37+
'MG',
38+
'ML',
39+
'MR',
40+
'MU',
41+
'MW',
42+
'MZ',
43+
'NA',
44+
'NE',
45+
'NG',
46+
'RE',
47+
'RW',
48+
'SC',
49+
'SD',
50+
'SH',
51+
'SL',
52+
'SN',
53+
'SO',
54+
'SS',
55+
'ST',
56+
'SZ',
57+
'TD',
58+
'TG',
59+
'TN',
60+
'TZ',
61+
'UG',
62+
'YT',
63+
'ZA',
64+
'ZM',
65+
'ZW',
66+
],
67+
],
68+
'AN' => [
69+
'key' => 'AN',
70+
'name' => 'Antarctica',
71+
'countries' => [
72+
'AQ',
73+
'BV',
74+
'GS',
75+
'HM',
76+
'TF',
77+
],
78+
],
79+
'AS' => [
80+
'key' => 'AS',
81+
'name' => 'Asia',
82+
'countries' => [
83+
'AE',
84+
'AF',
85+
'AM',
86+
'AZ',
87+
'BD',
88+
'BH',
89+
'BN',
90+
'BT',
91+
'CC',
92+
'CN',
93+
'CX',
94+
'CY',
95+
'GE',
96+
'HK',
97+
'ID',
98+
'IL',
99+
'IN',
100+
'IO',
101+
'IQ',
102+
'IR',
103+
'JO',
104+
'JP',
105+
'KG',
106+
'KH',
107+
'KP',
108+
'KR',
109+
'KW',
110+
'KZ',
111+
'LA',
112+
'LB',
113+
'LK',
114+
'MM',
115+
'MN',
116+
'MO',
117+
'MV',
118+
'MY',
119+
'NP',
120+
'OM',
121+
'PH',
122+
'PK',
123+
'PS',
124+
'QA',
125+
'SA',
126+
'SG',
127+
'SY',
128+
'TH',
129+
'TJ',
130+
'TL',
131+
'TM',
132+
'TW',
133+
'UZ',
134+
'VN',
135+
'YE',
136+
],
137+
],
138+
'EU' => [
139+
'key' => 'EU',
140+
'name' => 'Europe',
141+
'countries' => [
142+
'AD',
143+
'AL',
144+
'AT',
145+
'AX',
146+
'BA',
147+
'BE',
148+
'BG',
149+
'BY',
150+
'CH',
151+
'CZ',
152+
'DE',
153+
'DK',
154+
'EE',
155+
'ES',
156+
'FI',
157+
'FO',
158+
'FR',
159+
'GB',
160+
'GG',
161+
'GI',
162+
'GR',
163+
'HR',
164+
'HU',
165+
'IE',
166+
'IM',
167+
'IS',
168+
'IT',
169+
'JE',
170+
'LI',
171+
'LT',
172+
'LU',
173+
'LV',
174+
'MC',
175+
'MD',
176+
'ME',
177+
'MK',
178+
'MT',
179+
'NL',
180+
'NO',
181+
'PL',
182+
'PT',
183+
'RO',
184+
'RS',
185+
'RU',
186+
'SE',
187+
'SI',
188+
'SJ',
189+
'SK',
190+
'SM',
191+
'TR',
192+
'UA',
193+
'VA',
194+
],
195+
],
196+
'NA' => [
197+
'key' => 'NA',
198+
'name' => 'North America',
199+
'countries' => [
200+
'AG',
201+
'AI',
202+
'AW',
203+
'BB',
204+
'BL',
205+
'BM',
206+
'BQ',
207+
'BS',
208+
'BZ',
209+
'CA',
210+
'CR',
211+
'CU',
212+
'CW',
213+
'DM',
214+
'DO',
215+
'GD',
216+
'GL',
217+
'GP',
218+
'GT',
219+
'HN',
220+
'HT',
221+
'JM',
222+
'KN',
223+
'KY',
224+
'LC',
225+
'MF',
226+
'MQ',
227+
'MS',
228+
'MX',
229+
'NI',
230+
'PA',
231+
'PM',
232+
'PR',
233+
'SV',
234+
'SX',
235+
'TC',
236+
'TT',
237+
'US',
238+
'VC',
239+
'VG',
240+
'VI',
241+
],
242+
],
243+
'OC' => [
244+
'key' => 'OC',
245+
'name' => 'Oceania',
246+
'countries' => [
247+
'AS',
248+
'AU',
249+
'CK',
250+
'FJ',
251+
'FM',
252+
'GU',
253+
'KI',
254+
'MH',
255+
'MP',
256+
'NC',
257+
'NF',
258+
'NR',
259+
'NU',
260+
'NZ',
261+
'PF',
262+
'PG',
263+
'PN',
264+
'PW',
265+
'SB',
266+
'TK',
267+
'TO',
268+
'TV',
269+
'UM',
270+
'VU',
271+
'WF',
272+
'WS',
273+
],
274+
],
275+
'SA' => [
276+
'key' => 'SA',
277+
'name' => 'South America',
278+
'countries' => [
279+
'AR',
280+
'BO',
281+
'BR',
282+
'CL',
283+
'CO',
284+
'EC',
285+
'FK',
286+
'GF',
287+
'GY',
288+
'PE',
289+
'PY',
290+
'SR',
291+
'UY',
292+
'VE',
293+
],
294+
],
295+
];

0 commit comments

Comments
 (0)