Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

293
Views
PostGIS with Laravel

For some reason, using ST_Intersects in Laravel gives error:

Undefined function: 7 ERROR: function st_intersects(public.geometry, public.geometry) does not exist

Exactly same query, with same DB is working perfectly fine in plain PHP.

Full query text:

$query =
       "SELECT estado, municipio, COUNT(*)
        FROM public.focos_bdq, dados_geo.poligonos_deter
        WHERE ST_Intersects(focos_bdq.geometria, poligonos_deter.geom)
        AND bioma LIKE '$bioma_bd'
        AND date_trunc('month', data_hora_gmt)::date = '$mes_anterior'
        AND (satelite LIKE 'AQUA%' OR satelite LIKE 'TERRA%')
        GROUP BY municipio, estado
        ORDER BY COUNT(*) DESC";

$focos = \DB::select($query);
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Perhaps you should append the schema name (postgis) to the function name. postgis.ST_Intersects(...

Alternatively the user that laravel logs in with might need to have its schema search path set properly.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!