Question: I am using Laravel 4.2, with server side jQuery data-tables.

Package: <https://github.com/Chumper/Datatable>

How can I add custom sorting ?

like for columns of currency, time, etc

Answer: 
If you are trying to sort the collection or query result in any order, you can do something like this:

```
$orders = Order::all()->SortBy('currency','desc');

```

or

```
$customers = Customers::where('age',$age)->orderBy('currency','desc')->get();

```

By the way, why are you still on Laravel 4 when there is Laravel 8 already?
Haven't you checked the documentation? Because it's explained there:

```
public function getDatatable() { return Datatable::collection(User::all(array('id','name'))) ->showColumns('id', 'name') ->searchColumns('name') ->orderColumns('id','name') ->make(); }

```