Ver código fonte

添加分页status

chenxiqiang 6 anos atrás
pai
commit
1a060fe45e

+ 4
- 2
manage-server/app/Http/Controllers/ServerInfoController.php Ver arquivo

17
     {
17
     {
18
         $id = $request->input('id');
18
         $id = $request->input('id');
19
         $server = $request->input('server');
19
         $server = $request->input('server');
20
-        $content = $request->input('content');
20
+        $content = $request->input('content');;
21
+        $photo = $request->input('photo');
21
         if ($id) {
22
         if ($id) {
22
             $serverInfo = ServerInfo::find($id);
23
             $serverInfo = ServerInfo::find($id);
23
         } else {
24
         } else {
24
             $serverInfo = new Campaign;
25
             $serverInfo = new Campaign;
25
         }
26
         }
26
         if ($server && $content) {
27
         if ($server && $content) {
27
-            $serverInfo->title = $server;
28
+            $serverInfo->server = $server;
28
             $serverInfo->content = $content;
29
             $serverInfo->content = $content;
30
+            $serverInfo->photo = $photo;
29
             $serverInfo->save();
31
             $serverInfo->save();
30
             return Response()->json([
32
             return Response()->json([
31
                 "status" => 0,
33
                 "status" => 0,

+ 1
- 0
manage-server/app/Models/ServerInfo.php Ver arquivo

9
     protected $fillable = [
9
     protected $fillable = [
10
         'server', // 活动标题
10
         'server', // 活动标题
11
         'content', // 活动内容
11
         'content', // 活动内容
12
+        'photo', // 首页显示的
12
     ];
13
     ];
13
 }
14
 }

+ 2
- 1
manage-server/database/migrations/2018_08_15_102542_create_server_infos_table.php Ver arquivo

16
         Schema::create('server_infos', function (Blueprint $table) {
16
         Schema::create('server_infos', function (Blueprint $table) {
17
             $table->increments('id');
17
             $table->increments('id');
18
             $table->string('server');
18
             $table->string('server');
19
-            $table->string('content');
19
+            $table->text('content');
20
+            $table->string('photo');
20
             $table->timestamps();
21
             $table->timestamps();
21
         });
22
         });
22
     }
23
     }

Carregando…
Cancelar
Salvar