<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>method Archives - Artificial Intelligence</title>
	<atom:link href="https://www.aiuniverse.xyz/tag/method/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.aiuniverse.xyz/tag/method/</link>
	<description>Exploring the universe of Intelligence</description>
	<lastBuildDate>Wed, 16 Mar 2022 05:43:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Why I&#8217;m getting &#8216;Non-static method should not be called statically&#8217; when invoking a method in a Eloquent model?</title>
		<link>https://www.aiuniverse.xyz/why-im-getting-non-static-method-should-not-be-called-statically-when-invoking-a-method-in-a-eloquent-model/</link>
					<comments>https://www.aiuniverse.xyz/why-im-getting-non-static-method-should-not-be-called-statically-when-invoking-a-method-in-a-eloquent-model/#respond</comments>
		
		<dc:creator><![CDATA[dharmendra]]></dc:creator>
		<pubDate>Tue, 20 Jul 2021 12:53:19 +0000</pubDate>
				<category><![CDATA[laravel]]></category>
		<category><![CDATA[blade]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[modal]]></category>
		<category><![CDATA[static]]></category>
		<guid isPermaLink="false">https://www.aiuniverse.xyz/?p=15095</guid>

					<description><![CDATA[<p>I don&#8217;t know why I am getting this error: This is my blade file method: This is my model: Can you help me? I am trying to <a class="read-more-link" href="https://www.aiuniverse.xyz/why-im-getting-non-static-method-should-not-be-called-statically-when-invoking-a-method-in-a-eloquent-model/">Read More</a></p>
<p>The post <a href="https://www.aiuniverse.xyz/why-im-getting-non-static-method-should-not-be-called-statically-when-invoking-a-method-in-a-eloquent-model/">Why I&#8217;m getting &#8216;Non-static method should not be called statically&#8217; when invoking a method in a Eloquent model?</a> appeared first on <a href="https://www.aiuniverse.xyz">Artificial Intelligence</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="455" src="https://www.aiuniverse.xyz/wp-content/uploads/2021/07/today-1024x455.jpg" alt="" class="wp-image-15096" srcset="https://www.aiuniverse.xyz/wp-content/uploads/2021/07/today-1024x455.jpg 1024w, https://www.aiuniverse.xyz/wp-content/uploads/2021/07/today-300x133.jpg 300w, https://www.aiuniverse.xyz/wp-content/uploads/2021/07/today-768x341.jpg 768w, https://www.aiuniverse.xyz/wp-content/uploads/2021/07/today.jpg 1365w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>I don&#8217;t know why I am getting this error:</strong></p>



<pre class="wp-block-code"><code>Non-static method App\Userevent::returnopretor() should not be called statically</code></pre>



<h3 class="wp-block-heading">This is my blade file method:</h3>



<script src="https://gist.github.com/dharmu9898/31a0b7aa65c1fc59bf17b975790893a4.js"></script>



<h3 class="wp-block-heading">This is my model:</h3>



<script src="https://gist.github.com/dharmu9898/cdad5adb7bafaa515adb41d8b8c4948f.js"></script>



<p>Can you help me? I am trying to do dynamic dependency dropdown menu in view with this. Want to get user names and id from Userevent model for dropdown in view and than connect returnopretor with users and save data to product table with user id.</p>



<p><strong>Relationships is to be called on models, so you have to fetch them from a user model. Change your controller logic to just fetch Userevent, not anything with returnopretor.</strong></p>



<figure class="wp-block-image size-large"><img decoding="async" width="551" height="348" src="https://www.aiuniverse.xyz/wp-content/uploads/2021/07/modal.jpg" alt="" class="wp-image-15097" srcset="https://www.aiuniverse.xyz/wp-content/uploads/2021/07/modal.jpg 551w, https://www.aiuniverse.xyz/wp-content/uploads/2021/07/modal-300x189.jpg 300w" sizes="(max-width: 551px) 100vw, 551px" /></figure>



<script src="https://gist.github.com/dharmu9898/1bc8664e4ff5b99e6b3e866506a89f94.js"></script>



<p>So in your blade file where you create your drop down, loop the users and then you can loop the <strong>returnopretor</strong>.</p>



<p>solved this error.</p>
<p>The post <a href="https://www.aiuniverse.xyz/why-im-getting-non-static-method-should-not-be-called-statically-when-invoking-a-method-in-a-eloquent-model/">Why I&#8217;m getting &#8216;Non-static method should not be called statically&#8217; when invoking a method in a Eloquent model?</a> appeared first on <a href="https://www.aiuniverse.xyz">Artificial Intelligence</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aiuniverse.xyz/why-im-getting-non-static-method-should-not-be-called-statically-when-invoking-a-method-in-a-eloquent-model/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
