$task = Task::all();
$sort = $task->sortByDesc('id')->toArray();
return view('welcome')->with('sort',$sort);
i what to pass Eloquent collection object to array and than sort to iterate through but i get this error: htmlspecialchars() expects parameter 1 to be string, array given I don't know what the error means??
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire