質問編集履歴
1
spotests のテーブル構成を追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -142,6 +142,74 @@
|
|
142
142
|
|
143
143
|
|
144
144
|
|
145
|
+
```2021_05_10**_create_spotests_table.php
|
146
|
+
|
147
|
+
use Illuminate\Database\Migrations\Migration;
|
148
|
+
|
149
|
+
use Illuminate\Database\Schema\Blueprint;
|
150
|
+
|
151
|
+
use Illuminate\Support\Facades\Schema;
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
class CreateSpotestsTable extends Migration
|
156
|
+
|
157
|
+
{
|
158
|
+
|
159
|
+
/**
|
160
|
+
|
161
|
+
* Run the migrations.
|
162
|
+
|
163
|
+
*
|
164
|
+
|
165
|
+
* @return void
|
166
|
+
|
167
|
+
*/
|
168
|
+
|
169
|
+
public function up()
|
170
|
+
|
171
|
+
{
|
172
|
+
|
173
|
+
Schema::create('spotests', function (Blueprint $table) {
|
174
|
+
|
175
|
+
$table->id();
|
176
|
+
|
177
|
+
$table->text('name');
|
178
|
+
|
179
|
+
$table->json('schedule');
|
180
|
+
|
181
|
+
$table->timestamps();
|
182
|
+
|
183
|
+
});
|
184
|
+
|
185
|
+
}
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
/**
|
190
|
+
|
191
|
+
* Reverse the migrations.
|
192
|
+
|
193
|
+
*
|
194
|
+
|
195
|
+
* @return void
|
196
|
+
|
197
|
+
*/
|
198
|
+
|
199
|
+
public function down()
|
200
|
+
|
201
|
+
{
|
202
|
+
|
203
|
+
Schema::dropIfExists('spotests');
|
204
|
+
|
205
|
+
}
|
206
|
+
|
207
|
+
}
|
208
|
+
|
209
|
+
```
|
210
|
+
|
211
|
+
|
212
|
+
|
145
213
|
### 試したこと
|
146
214
|
|
147
215
|
エラーには Array to string conversion と出ているので、'schedule'の配列を文字列に変換できない事かと思い、
|