laravel 中 给模型表 起别名
Order 设置成 o 这样 deleted_at 就不会报错了
$res = (new Order()) ->setTable('o') ->from( 'orders as o' ) ->leftJoin( 'users as u', 'o.user_id', '=', 'u.id' ) ->select( [ 'o.id as id', 'o.type', 'u.uuid' ] ) ->whereDate( 'o.orders_time', '2022-09-20' ) ->first()->toArray();