Laravel: seeding a nested set table with Faker
问题 I'm using Kalnoy/Nestedset and trying to seed my comments table using faker, but get "Array to string conversion" error. The comment table looks like this: Schema::create('comments', function (Blueprint $table) { $table->increments('id'); $table->unsignedInteger('user_id'); $table->unsignedInteger('post_id'); $table->text('body'); $table->timestamps(); $table->nestedSet(); }); The comment factory: use Faker\Generator as Faker; $factory->define( App\Models\Comment::class, function (Faker