<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 xmlns:atom="http://www.w3.org/2005/Atom"
>
	<channel>
		<copyright>Copyright 1998 - 2026 DPG Media B.V.</copyright>
		<pubDate>Fri, 24 Jul 2026 07:15:08 GMT</pubDate>
		<lastBuildDate>Fri, 24 Jul 2026 07:15:08 GMT</lastBuildDate>
		<description>GoT - list_messages</description>
		<image>
			<link>https://gathering.tweakers.net/</link>
			<title>Gathering of Tweakers</title>
			<url>https://tweakers.net/g/if/logo.gif</url>
		</image>
		<language>nl-nl</language>
		<link>https://gathering.tweakers.net/rss/list_messages/2161498</link>
		<atom:link href="https://gathering.tweakers.net/rss/list_messages/2161498" rel="self" type="application/rss+xml" />
		<title>Laravel Postgis query werkt niet - Softwareontwikkeling - GoT</title>
		<webMaster>gathering@tweakers.net (Administrator)</webMaster>
		<item>
			<title>Tsjilp</title>
			<link>https://gathering.tweakers.net/forum/list_message/73699144#73699144</link>
			<description>Om mijn eigen vraag te beantwoorden: st_makeenvelope verwacht minimaal 4 argumenten, (die zitten allemaal in de bbox string), dus de volgende constructie werkt wel:
code:1
Photo::whereRaw(&#039;&quot;location&quot; &amp;&amp; st_makeenvelope(?,?,?,?)&#039;,explode(&#039;,&#039;,$request-&gt;get(&#039;bbox&#039;)))-&gt;get();</description>
			<content:encoded><![CDATA[Om mijn eigen vraag te beantwoorden: st_makeenvelope verwacht minimaal 4 argumenten, (die zitten allemaal in de bbox string), dus de volgende constructie werkt wel:<br>
<div class="code">code:<br><table class="phphighlight"><tr><td class="phphighlightline"><pre>1
</pre></td><td class="phphighlightcode"><div><pre>Photo::whereRaw(&#39;&quot;location&quot; &amp;&amp; st_makeenvelope(?,?,?,?)&#39;,explode(&#39;,&#39;,$request-&gt;get(&#39;bbox&#39;)))-&gt;get();</pre></div></td></tr></table></div>]]></content:encoded>
			<dc:creator>Tsjilp</dc:creator>
			<guid isPermaLink="false">https://gathering.tweakers.net/forum/list_message/73699144#73699144</guid>
			<pubDate>Mon, 05 Dec 2022 18:33:44 GMT</pubDate>
		</item>
		<item>
			<title>Tsjilp</title>
			<link>https://gathering.tweakers.net/forum/list_message/73699058#73699058</link>
			<description>Ik probeer in laravel (9) de volgende query op een postgres database uit te voeren:
code:1
select * from &quot;photos&quot; where &quot;location&quot; &amp;&amp; st_makeenvelope(2.6576374457007708,50.67891976112179,7.6277165460462575,52.5978158533737)
Wanneer ik deze query in DBeaver draai krijg ik netjes resultaat, ook als ik de query via DB::Select / DB::Raw draai: 
code:1
DB::select(DB::raw(&#039;select * from &quot;photos&quot; where &quot;location&quot; &amp;&amp; st_makeenvelope(2.6576374457007708,50.67891976112179,7.6277165460462575,52.5978158533737)&#039;));
krijg ik resultaat. Echter als ik hem op deze manier probeer te draaien: 
code:1
Photo::whereRaw(&#039;&quot;location&quot; &amp;&amp; st_makeenvelope(?)&#039;,$request-&gt;get(&#039;bbox&#039;))-&gt;get()
Krijg ik:SQLSTATE[42883]: Undefined function: 7 ERROR: function st_makeenvelope(unknown) does not exist LINE 1: select * from &quot;photos&quot; where &quot;location&quot; &amp;&amp; st_makeenvelope($... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. 
select * from &quot;photos&quot; where &quot;location&quot; &amp;&amp; st_makeenvelope(2.6576374457007708,50.67891976112179,7.6277165460462575,52.5978158533737)Ik heb postgis toegevoegd als schema in database.php zoals gesuggereerd in https://stackoverflow.com/a/52446997/4111346, mocht helaas niet baten.</description>
			<content:encoded><![CDATA[Ik probeer in laravel (9) de volgende query op een postgres database uit te voeren:<br>
<div class="code">code:<br><table class="phphighlight"><tr><td class="phphighlightline"><pre>1
</pre></td><td class="phphighlightcode"><div><pre>select * from &quot;photos&quot; where &quot;location&quot; &amp;&amp; st_makeenvelope(2.6576374457007708,50.67891976112179,7.6277165460462575,52.5978158533737)</pre></div></td></tr></table></div><br>
Wanneer ik deze query in DBeaver draai krijg ik netjes resultaat, ook als ik de query via DB::Select / DB::Raw draai: <br>
<div class="code">code:<br><table class="phphighlight"><tr><td class="phphighlightline"><pre>1
</pre></td><td class="phphighlightcode"><div><pre>DB::select(DB::raw(&#39;select * from &quot;photos&quot; where &quot;location&quot; &amp;&amp; st_makeenvelope(2.6576374457007708,50.67891976112179,7.6277165460462575,52.5978158533737)&#39;));</pre></div></td></tr></table></div><br>
krijg ik resultaat. Echter als ik hem op deze manier probeer te draaien: <br>
<div class="code">code:<br><table class="phphighlight"><tr><td class="phphighlightline"><pre>1
</pre></td><td class="phphighlightcode"><div><pre>Photo::whereRaw(&#39;&quot;location&quot; &amp;&amp; st_makeenvelope(?)&#39;,$request-&gt;get(&#39;bbox&#39;))-&gt;get()</pre></div></td></tr></table></div><br>
Krijg ik:<blockquote><div class="message-quote-div">SQLSTATE[42883]: Undefined function: 7 ERROR: function st_makeenvelope(unknown) does not exist LINE 1: select * from &quot;photos&quot; where &quot;location&quot; &amp;&amp; st_makeenvelope($... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. <br>
select * from &quot;photos&quot; where &quot;location&quot; &amp;&amp; st_makeenvelope(2.6576374457007708,50.67891976112179,7.6277165460462575,52.5978158533737)</div></blockquote>Ik heb postgis toegevoegd als schema in database.php zoals gesuggereerd in <a href="https://stackoverflow.com/a/52446997/4111346" rel="external nofollow">https://stackoverflow.com/a/52446997/4111346</a>, mocht helaas niet baten.]]></content:encoded>
			<dc:creator>Tsjilp</dc:creator>
			<guid isPermaLink="false">https://gathering.tweakers.net/forum/list_message/73699058#73699058</guid>
			<pubDate>Mon, 05 Dec 2022 18:26:34 GMT</pubDate>
		</item>
	</channel>
</rss>