質問編集履歴
1
Controllerの記述を追加しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,6 +42,30 @@
|
|
42
42
|
|
43
43
|
```
|
44
44
|
|
45
|
+
```PHP
|
46
|
+
|
47
|
+
public function save(Request $request)
|
48
|
+
|
49
|
+
{
|
50
|
+
|
51
|
+
$group= session()->get('group');
|
52
|
+
|
53
|
+
$add_group = new Group();
|
54
|
+
|
55
|
+
$add_group ->group_id = $request->id;
|
56
|
+
|
57
|
+
$add_group ->group_number = $group->id;
|
58
|
+
|
59
|
+
$add_group ->save();
|
60
|
+
|
61
|
+
return response()->json($add_group);
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
```
|
66
|
+
|
67
|
+
|
68
|
+
|
45
69
|
|
46
70
|
|
47
71
|
### 試したこと
|