質問編集履歴
2
エラー内容の詳細化
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,6 +11,28 @@
|
|
11
11
|
```エラー内容
|
12
12
|
|
13
13
|
A non-numeric value encountered
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
at C:\Users\○○\git\minlabo\database\seeds\Lab_evaluationTableSeeder.php:59
|
18
|
+
|
19
|
+
55| 'prof_friendly' => rand(1.0, 5.0),
|
20
|
+
|
21
|
+
56| 'prof_jobhunt' => rand(1.0, 5.0),
|
22
|
+
|
23
|
+
57| 'prof_network' => rand(1.0, 5.0),
|
24
|
+
|
25
|
+
58| 'prof_experience' => rand(1.0, 5.0),
|
26
|
+
|
27
|
+
> 59| 'prof_average' => ('prof_care'+'prof_friendly'+'prof_jobhunt'+'prof_network'+'prof_experience') / 5.0,
|
28
|
+
|
29
|
+
60| 'job_major' => rand(1.0, 5.0),
|
30
|
+
|
31
|
+
61| 'job_small' => rand(1.0, 5.0),
|
32
|
+
|
33
|
+
62| 'job_jobhunt' => rand(1.0, 5.0),
|
34
|
+
|
35
|
+
63| 'job_recommendation' => rand(1.0, 5.0),
|
14
36
|
|
15
37
|
```
|
16
38
|
|
1
ソースコードの添付
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,4 +22,90 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
+
```ここに言語を入力
|
26
|
+
|
27
|
+
<?php
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
use Illuminate\Database\Seeder;
|
32
|
+
|
33
|
+
|
34
|
+
|
25
|
-
|
35
|
+
class Lab_evaluationTableSeeder extends Seeder
|
36
|
+
|
37
|
+
{
|
38
|
+
|
39
|
+
/**
|
40
|
+
|
41
|
+
* Run the database seeds.
|
42
|
+
|
43
|
+
*
|
44
|
+
|
45
|
+
* @return void
|
46
|
+
|
47
|
+
*/
|
48
|
+
|
49
|
+
public function run()
|
50
|
+
|
51
|
+
{
|
52
|
+
|
53
|
+
$univ_array = [
|
54
|
+
|
55
|
+
"東京大学","山形大学","北海道大学","徳島大学","島根大学","東北大学",
|
56
|
+
|
57
|
+
"岡山大学","鳥取大学","新潟大学","熊本大学","佐賀大学","九州大学",
|
58
|
+
|
59
|
+
"神戸大学","大阪大学","京都大学","関西大学","慶應大学","早稲田大学",
|
60
|
+
|
61
|
+
"岡山理科大学","香川大学","愛媛大学","高知大学","広島大学","近畿大学",
|
62
|
+
|
63
|
+
];
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
$lab_array = [
|
68
|
+
|
69
|
+
"佐藤研究室","谷口研究室","田中研究室","神戸研究室","中田研究室","斎藤研究室","神谷研究室","見城研究室",
|
70
|
+
|
71
|
+
"南波研究室","梶崎研究室","服部研究室","坂口研究室","田口研究室","高橋研究室","清水研究室","新見研究室",
|
72
|
+
|
73
|
+
"南研究室","東研究室","手塚研究室","多田研究室","古賀研究室","六条研究室","灰田研究室","馬場研究室",
|
74
|
+
|
75
|
+
];
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
DB::table('lab_evaluation')->insert([
|
80
|
+
|
81
|
+
[
|
82
|
+
|
83
|
+
'lab_name' => $lab_array[rand(0, 23)],
|
84
|
+
|
85
|
+
'lab_univ' => $univ_array[rand(0, 23)],
|
86
|
+
|
87
|
+
'user_id' => rand(1, 19),
|
88
|
+
|
89
|
+
'prof_care' => rand(1.0, 5.0),
|
90
|
+
|
91
|
+
'prof_friendly' => rand(1.0, 5.0),
|
92
|
+
|
93
|
+
'prof_jobhunt' => rand(1.0, 5.0),
|
94
|
+
|
95
|
+
'prof_network' => rand(1.0, 5.0),
|
96
|
+
|
97
|
+
'prof_experience' => rand(1.0, 5.0),
|
98
|
+
|
99
|
+
'prof_average' => ('prof_care'+'prof_friendly'+'prof_jobhunt'+'prof_network'+'prof_experience') / 5.0,
|
100
|
+
|
101
|
+
],
|
102
|
+
|
103
|
+
]);
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
}
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
```
|