@@ -13,11 +13,11 @@ |
||
13 | 13 | */ |
14 | 14 | public function run() |
15 | 15 | { |
16 | - $body = file_get_contents('https://api.vk.com/method/database.getCountries?v=5.5&need_all=1&count=1000&lang='. |
|
17 | - config('geography.locale') . '&code=' . config('geography.country') . '&access_token=' . |
|
18 | - config('geography.access_token')); |
|
19 | - $response = json_decode($body, true); |
|
16 | + $body = file_get_contents('https://api.vk.com/method/database.getCountries?v=5.5&need_all=1&count=1000&lang='. |
|
17 | + config('geography.locale') . '&code=' . config('geography.country') . '&access_token=' . |
|
18 | + config('geography.access_token')); |
|
19 | + $response = json_decode($body, true); |
|
20 | 20 | |
21 | - Capsule::table( config('geography.nameTable.country') )->insert( $response['response']['items'] ); |
|
21 | + Capsule::table( config('geography.nameTable.country') )->insert( $response['response']['items'] ); |
|
22 | 22 | } |
23 | 23 | } |
@@ -13,11 +13,11 @@ |
||
13 | 13 | */ |
14 | 14 | public function run() |
15 | 15 | { |
16 | - $body = file_get_contents('https://api.vk.com/method/database.getCountries?v=5.5&need_all=1&count=1000&lang='. |
|
17 | - config('geography.locale') . '&code=' . config('geography.country') . '&access_token=' . |
|
16 | + $body = file_get_contents('https://api.vk.com/method/database.getCountries?v=5.5&need_all=1&count=1000&lang=' . |
|
17 | + config('geography.locale') . '&code=' . config('geography.country') . '&access_token=' . |
|
18 | 18 | config('geography.access_token')); |
19 | - $response = json_decode($body, true); |
|
19 | + $response = json_decode($body, true); |
|
20 | 20 | |
21 | - Capsule::table( config('geography.nameTable.country') )->insert( $response['response']['items'] ); |
|
21 | + Capsule::table(config('geography.nameTable.country'))->insert($response['response']['items']); |
|
22 | 22 | } |
23 | 23 | } |