0
Warum gibt es 5 Elemente im Array und count() gibt 4 aus?Laravel: Warum gibt count() einen Wert zurück
public function show($id)
{
$task = Task::findOrFail($id);
dd($task->toArray(), $task->count());
return view('pages.show')->with('task', $task);
}
Ausgänge:
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
Das Array zeigt deutlich 5 Artikel