src/ApiTrait.php
public function _getOrders(Request $request, Builder $builder)
	{
		$orders = $request->input('o', []);
		//默认按照主键的倒序
		return empty($orders) ? [$builder->getModel()->getKeyName() => 'desc'] : $orders;
	}
public function _getOrders(Request $request, Builder $builder)
	{
		$orders = $request->input('o', []);
		//默认按照主键的倒序
		return empty($orders) ? [$builder->getModel()->getKeyName() => 'desc'] : $orders;
	}
获取排序的参数
1. datatable 的方式
2. order[id]=desc&order[created_at]=asc 类似这种方式
默认是按主键倒序

@param  Request $request
@param  Builder $builder
@return array           返回参数列表