Laravel 5.3 allows migrations with json $ table-> json ('links_normal');
But in the seed
DB::table('courses')->insert([
'name' => 'Curso Nuevo',
"links_normales": {
"Opcion 1": "xd",
"Opcion 2": "red"
}
]);
When I try to make that seed come out: syntax error, unexpected '{', expecting ']'
The factory I have this
$factory->define(App\Course::class, function (Faker\Generator $faker) {
return [
'name' => $faker->name,
'links_normales' => $faker->name,
];
});
The problem is how the json added to the seed