Skip to content

Commit c140e65

Browse files
committed
add fixible download link
1 parent 21e3679 commit c140e65

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "laravel/installer",
3-
"description": "Laravel application installer.",
2+
"name": "laravel-china/installer",
3+
"description": "Laravel application installer for China",
44
"keywords": ["laravel"],
55
"license": "MIT",
66
"authors": [
77
{
8-
"name": "Taylor Otwell",
9-
"email": "taylorotwell@gmail.com"
8+
"name": "Charlie Jade",
9+
"email": "summer.alex07@gmail.com"
1010
}
1111
],
1212
"autoload": {
@@ -17,7 +17,7 @@
1717
"symfony/console": "~2.3"
1818
},
1919
"bin": [
20-
"laravel"
20+
"cnlaravel"
2121
],
2222
"minimum-stability": "stable"
2323
}

laravel

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/NewCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ protected function makeFilename()
7676
*/
7777
protected function download($zipFile)
7878
{
79-
$response = \GuzzleHttp\get('http://cabinet.laravel.com/latest.zip')->getBody();
79+
$data = json_decode(\GuzzleHttp\get('http://laravel-china.org/download_link.json')->getBody(), true);
80+
$response = \GuzzleHttp\get($data['link'])->getBody();
8081

8182
file_put_contents($zipFile, $response);
8283

0 commit comments

Comments
 (0)