-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathState.php
85 lines (79 loc) · 3.43 KB
/
State.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Sushi\Sushi;
class States extends Model
{
use Sushi;
protected static function boot()
{
parent::boot();
static::addGlobalScope('order', function ($query) {
$query->orderBy('name', 'asc');
});
}
public function getRows()
{
return [
['code' => 'AL', 'name' => 'Alabama'],
['code' => 'AK', 'name' => 'Alaska'],
['code' => 'AS', 'name' => 'American Samoa'],
['code' => 'AZ', 'name' => 'Arizona'],
['code' => 'AR', 'name' => 'Arkansas'],
['code' => 'CA', 'name' => 'California'],
['code' => 'CO', 'name' => 'Colorado'],
['code' => 'CT', 'name' => 'Connecticut'],
['code' => 'DE', 'name' => 'Delaware'],
['code' => 'DC', 'name' => 'Dist. of Columbia'],
['code' => 'FL', 'name' => 'Florida'],
['code' => 'GA', 'name' => 'Georgia'],
['code' => 'GU', 'name' => 'Guam'],
['code' => 'HI', 'name' => 'Hawaii'],
['code' => 'ID', 'name' => 'Idaho'],
['code' => 'IL', 'name' => 'Illinois'],
['code' => 'IN', 'name' => 'Indiana'],
['code' => 'IA', 'name' => 'Iowa'],
['code' => 'KS', 'name' => 'Kansas'],
['code' => 'KY', 'name' => 'Kentucky'],
['code' => 'LA', 'name' => 'Louisiana'],
['code' => 'ME', 'name' => 'Maine'],
['code' => 'MD', 'name' => 'Maryland'],
['code' => 'MH', 'name' => 'Marshall Islands'],
['code' => 'MA', 'name' => 'Massachusetts'],
['code' => 'MI', 'name' => 'Michigan'],
['code' => 'FM', 'name' => 'Micronesia'],
['code' => 'MN', 'name' => 'Minnesota'],
['code' => 'MS', 'name' => 'Mississippi'],
['code' => 'MO', 'name' => 'Missouri'],
['code' => 'MT', 'name' => 'Montana'],
['code' => 'NE', 'name' => 'Nebraska'],
['code' => 'NV', 'name' => 'Nevada'],
['code' => 'NH', 'name' => 'New Hampshire'],
['code' => 'NJ', 'name' => 'New Jersey'],
['code' => 'NM', 'name' => 'New Mexico'],
['code' => 'NY', 'name' => 'New York'],
['code' => 'NC', 'name' => 'North Carolina'],
['code' => 'ND', 'name' => 'North Dakota'],
['code' => 'MP', 'name' => 'Northern Marianas'],
['code' => 'OH', 'name' => 'Ohio'],
['code' => 'OK', 'name' => 'Oklahoma'],
['code' => 'OR', 'name' => 'Oregon'],
['code' => 'PW', 'name' => 'Palau'],
['code' => 'PA', 'name' => 'Pennsylvania'],
['code' => 'PR', 'name' => 'Puerto Rico'],
['code' => 'RI', 'name' => 'Rhode Island'],
['code' => 'SC', 'name' => 'South Carolina'],
['code' => 'SD', 'name' => 'South Dakota'],
['code' => 'TN', 'name' => 'Tennessee'],
['code' => 'TX', 'name' => 'Texas'],
['code' => 'UT', 'name' => 'Utah'],
['code' => 'VT', 'name' => 'Vermont'],
['code' => 'VA', 'name' => 'Virginia'],
['code' => 'VI', 'name' => 'Virgin Islands'],
['code' => 'WA', 'name' => 'Washington'],
['code' => 'WV', 'name' => 'West Virginia'],
['code' => 'WI', 'name' => 'Wisconsin'],
['code' => 'WY', 'name' => 'Wyoming']
];
}
}