0
배열에 5 개의 항목이 있고 count() 출력에 4가있는 이유는 무엇입니까?Laravel : count()가 1을 더 적게 반환하는 이유
public function show($id)
{
$task = Task::findOrFail($id);
dd($task->toArray(), $task->count());
return view('pages.show')->with('task', $task);
}
출력 :
이array:5 [▼
"id" => 1
"title" => "first"
"description" => "description for first"
"created_at" => "2016-10-09 19:34:04"
"updated_at" => "2016-10-09 19:34:04"
]
4
배열은 분명히 5 개 항목