Method [where] does not exist
<p>I have encountered a problem while working in <code>Laravel</code> project.</p>

<p>Method [where] does not exist. i know the '<code>Where</code>' clause is causing it .</p>

<p>I have studied it but not solution is found. finally i had to ask here.</p>

<pre><code>$data = Track::where(
                [
                    ['generated_by', '=', Input::get('user_id')],
                    ['id', '=',Input::get('track_id') ],
                ])-&gt;get();


            $finalResult = array('code' =&gt; 100,
                'msg' =&gt; 'Your Account is found.',
                'data' =&gt; $data
                );
</code></pre>

<p>My controller name is <code>Track</code> . i have also made a Model named <code>Track</code> . the corresponding table name is <code>tracks</code> as <code>laravel</code> requires it to be plural of your model.</p>

<p>Can anybody please help me in this situation ?</p>