define(ToDo::class, function (Faker $faker) { $toDoList = factory(\App\Models\ToDoList::class); return [ 'to_do_list_id' => $toDoList, 'name' => $faker->words(3, [false]), // 'order' => $toDoList->toDos->orderBy('id', 'desc')->first()->order + 1, // 'checket_at' => now(), ]; });