public function toArray($request)
{
return [
'id' => $this->id,
'comment' => $this->message,
'date' => $this->created_at->format('d.m.Y H:i:s'),
];
}
告诉我如何排序以created_at
使新的在顶部?
public function toArray($request)
{
return [
'id' => $this->id,
'comment' => $this->message,
'date' => $this->created_at->format('d.m.Y H:i:s'),
];
}
告诉我如何排序以created_at
使新的在顶部?
当您做出选择时,立即排序。例如
Comments