chenxiqiang 6 лет назад
Родитель
Сommit
179cd7b15e

+ 1
- 0
manage-server/app/Http/Kernel.php Просмотреть файл

@@ -19,6 +19,7 @@ class Kernel extends HttpKernel
19 19
         \App\Http\Middleware\TrimStrings::class,
20 20
         \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
21 21
         \App\Http\Middleware\TrustProxies::class,
22
+        \Barryvdh\Cors\HandleCors::class,
22 23
     ];
23 24
 
24 25
     /**

+ 8
- 1
manage-server/composer.json Просмотреть файл

@@ -6,6 +6,7 @@
6 6
     "type": "project",
7 7
     "require": {
8 8
         "php": "^7.1.3",
9
+        "barryvdh/laravel-cors": "^0.11.0",
9 10
         "fideloper/proxy": "^4.0",
10 11
         "laravel/framework": "5.6.*",
11 12
         "laravel/tinker": "^1.0",
@@ -56,5 +57,11 @@
56 57
         "optimize-autoloader": true
57 58
     },
58 59
     "minimum-stability": "dev",
59
-    "prefer-stable": true
60
+    "prefer-stable": true,
61
+    "repositories": {
62
+        "packagist": {
63
+            "type": "composer",
64
+            "url": "https://packagist.phpcomposer.com"
65
+        }
66
+    }
60 67
 }

+ 114
- 1
manage-server/composer.lock Просмотреть файл

@@ -4,8 +4,121 @@
4 4
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 5
         "This file is @generated automatically"
6 6
     ],
7
-    "content-hash": "592c7a24971d6d39d53b7229b418bdc9",
7
+    "content-hash": "1c481a3aca5d2101d9cbd0a8001df6a1",
8 8
     "packages": [
9
+        {
10
+            "name": "asm89/stack-cors",
11
+            "version": "1.2.0",
12
+            "source": {
13
+                "type": "git",
14
+                "url": "https://github.com/asm89/stack-cors.git",
15
+                "reference": "c163e2b614550aedcf71165db2473d936abbced6"
16
+            },
17
+            "dist": {
18
+                "type": "zip",
19
+                "url": "https://api.github.com/repos/asm89/stack-cors/zipball/c163e2b614550aedcf71165db2473d936abbced6",
20
+                "reference": "c163e2b614550aedcf71165db2473d936abbced6",
21
+                "shasum": ""
22
+            },
23
+            "require": {
24
+                "php": ">=5.5.9",
25
+                "symfony/http-foundation": "~2.7|~3.0|~4.0",
26
+                "symfony/http-kernel": "~2.7|~3.0|~4.0"
27
+            },
28
+            "require-dev": {
29
+                "phpunit/phpunit": "^5.0 || ^4.8.10",
30
+                "squizlabs/php_codesniffer": "^2.3"
31
+            },
32
+            "type": "library",
33
+            "extra": {
34
+                "branch-alias": {
35
+                    "dev-master": "1.2-dev"
36
+                }
37
+            },
38
+            "autoload": {
39
+                "psr-4": {
40
+                    "Asm89\\Stack\\": "src/Asm89/Stack/"
41
+                }
42
+            },
43
+            "notification-url": "https://packagist.org/downloads/",
44
+            "license": [
45
+                "MIT"
46
+            ],
47
+            "authors": [
48
+                {
49
+                    "name": "Alexander",
50
+                    "email": "iam.asm89@gmail.com"
51
+                }
52
+            ],
53
+            "description": "Cross-origin resource sharing library and stack middleware",
54
+            "homepage": "https://github.com/asm89/stack-cors",
55
+            "keywords": [
56
+                "cors",
57
+                "stack"
58
+            ],
59
+            "time": "2017-12-20T14:37:45+00:00"
60
+        },
61
+        {
62
+            "name": "barryvdh/laravel-cors",
63
+            "version": "v0.11.0",
64
+            "source": {
65
+                "type": "git",
66
+                "url": "https://github.com/barryvdh/laravel-cors.git",
67
+                "reference": "6ba64a654b4258a3ecc11aba6614c932b3442e30"
68
+            },
69
+            "dist": {
70
+                "type": "zip",
71
+                "url": "https://api.github.com/repos/barryvdh/laravel-cors/zipball/6ba64a654b4258a3ecc11aba6614c932b3442e30",
72
+                "reference": "6ba64a654b4258a3ecc11aba6614c932b3442e30",
73
+                "shasum": ""
74
+            },
75
+            "require": {
76
+                "asm89/stack-cors": "^1.2",
77
+                "illuminate/support": "5.3.x|5.4.x|5.5.x|5.6.x",
78
+                "php": ">=5.5.9",
79
+                "symfony/http-foundation": "^3.1|^4",
80
+                "symfony/http-kernel": "^3.1|^4"
81
+            },
82
+            "require-dev": {
83
+                "orchestra/testbench": "3.x",
84
+                "phpunit/phpunit": "^4.8|^5.2",
85
+                "squizlabs/php_codesniffer": "^2.3"
86
+            },
87
+            "type": "library",
88
+            "extra": {
89
+                "branch-alias": {
90
+                    "dev-master": "0.11-dev"
91
+                },
92
+                "laravel": {
93
+                    "providers": [
94
+                        "Barryvdh\\Cors\\ServiceProvider"
95
+                    ]
96
+                }
97
+            },
98
+            "autoload": {
99
+                "psr-4": {
100
+                    "Barryvdh\\Cors\\": "src/"
101
+                }
102
+            },
103
+            "notification-url": "https://packagist.org/downloads/",
104
+            "license": [
105
+                "MIT"
106
+            ],
107
+            "authors": [
108
+                {
109
+                    "name": "Barry vd. Heuvel",
110
+                    "email": "barryvdh@gmail.com"
111
+                }
112
+            ],
113
+            "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application",
114
+            "keywords": [
115
+                "api",
116
+                "cors",
117
+                "crossdomain",
118
+                "laravel"
119
+            ],
120
+            "time": "2018-01-04T06:59:27+00:00"
121
+        },
9 122
         {
10 123
             "name": "dnoegel/php-xdg-base-dir",
11 124
             "version": "0.1",

+ 31
- 0
manage-server/database/migrations/2018_08_22_033723_create_classifies_table.php Просмотреть файл

@@ -0,0 +1,31 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\Schema;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Database\Migrations\Migration;
6
+
7
+class CreateClassifiesTable extends Migration
8
+{
9
+    /**
10
+     * Run the migrations.
11
+     *
12
+     * @return void
13
+     */
14
+    public function up()
15
+    {
16
+        Schema::create('classifies', function (Blueprint $table) {
17
+            $table->increments('id');
18
+            $table->timestamps();
19
+        });
20
+    }
21
+
22
+    /**
23
+     * Reverse the migrations.
24
+     *
25
+     * @return void
26
+     */
27
+    public function down()
28
+    {
29
+        Schema::dropIfExists('classifies');
30
+    }
31
+}

Загрузка…
Отмена
Сохранить