The orderByRaw method may be used to provide a raw string as the value of the "order by" clause:
orderByRaw
$orders = DB::table('orders') ->orderByRaw('updated_at - created_at DESC') ->get();