按照距离远近排序

admin1年前Laravel498

   $distance = "ACOS(SIN(( $lat * 3.1415) / 180 ) *SIN((lat * 3.1415) / 180 ) +COS(( $lat* 3.1415) / 180 ) * COS((lat * 3.1415) / 180 ) *COS(( $lng* 3.1415) / 180 - (lng * 3.1415) / 180 ) ) * 6380";

                    $info = $info->addSelect('*', DB::raw($distance . ' as distance'))->orderByRaw('`distance` ASC');


相关文章

微信退款v2

/** * 微信 退款 操作 */ public function refund($out_trade_no, $total_fee) { $parma =...

获取微信的Token

 public function Token()    {        $this->path = __DIR__ . &...

批量处理数据

   public function index44()    {        $domain = request(...

公众号登录

public function wxlogin(){       $code = request()->input('code'); &n...

发送公众号信息

* 发送消息 */public function tosend($openid, $title, $content, $time, $aid){    $tokens = $thi...

生成唯一的订单号

public function get_order_sn() {     return date('Ymd') ...