s
e
r
v
a
n
t
s
=
S
e
r
v
a
n
t
:
:
w
h
e
r
e
I
n
(
′
u
s
e
r
i
d
′
,
[
servants = Servant::whereIn('user_id',[
servants=Servant::whereIn(′userid′,[request->user_id])
->select(
‘user_id’,
DB::raw('AsText(position) as position ‘)
)
->get()
->toArray();
KaTeX parse error: Expected '}', got 'EOF' at end of input: …GeomFromText('{servants[0][‘position’]}’)");
if ($servants) {
$distance = Servant::select(
DB::raw(
'user_id,
(ST_Distance('. $position .', point( astext(position), y(position)))/0.0111) as distance')
)
->whereIn('user_id',$user_ids)
->get()
->toArray();
dump($distance);exit;
}