The problem here is sorting using a string value instead of a timestamp. So you are sorting given your formatted date.
If you are not using ajax in order to render your datatable, then you can use the data-sort or data-order attributes on the cell containing your date to let the library know which value to use for sorting, and you should give the timestamp of the date. More on this here
As I can see you are using ajax, so in that case your date column should return the timestamp like this:
...
->editColumn('created_at', function($data_rem) {
return $data_rem->created_at->timestamp; // I guess the created_at is a Carbon instance
})
Then in your JavaScript, I override the rowCallback function on the DataTable and I format the date there:
rowCallback: function (row, data, index) {
let dateCell = data.created_at;
if (dateCell !== undefined && dateCell > 0) {
let date = moment.unix(dateCell).format('d F Y'); // I am not sure that the format is the same using moment js. Or you can use your format here
$('td:eq(3)', row).html(date); // 3 here is equal to the cell in which the date should be placed in the table.
}
}
Hope this helps.