title: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'gelecek_üyeliği_sistemi.action_users, users' doesn't exist
body: <p>I need to get these data from action_users table I have write a query in Mysql and it works fine
  but when I am trying to Convert SQL Statement into Laravel Eloquent i got this error</p>
  <p><strong>i am using laravel 8</strong></p>
  <p>SQLSTATE[42S02]: Base table or view not found: 1146 Table 'gelecek_üyeliği_sistemi.action_users,users' doesn't exist (SQL: select <code>users</code>.<code>name</code>, <code>users</code>.<code>email</code>, <code>sum(action_users</code>.<code>point)</code> from <code>action_users,users</code> where <code>users</code>.<code>id</code> = action_users.user_id group by <code>users</code>)</p>
  <p><strong>here is my query in mysql and works fine in mysql</strong></p>
  <pre><code>SELECT users.id, users.name, users.email, SUM(action_users.point) FROM action_users, users WHERE users.id=action_users.user_id group by users.id
  </code></pre>
  <p><strong>here is my same query in the controller</strong></p>
  <pre><code>$total = DB::table(&quot;action_users,users&quot;)
  -&gt;select(&quot;users.name&quot;,&quot;users.email&quot;, &quot;sum(action_users.point)&quot;)
  -&gt;where(&quot;users.id&quot;, &quot;=&quot;,&quot;action_users.user_id&quot;)
  -&gt;groupBy(&quot;users&quot;)
  -&gt;get();
  
  dd($total);
  </code></pre>
  <p><strong>here is action_users migration</strong></p>
  <pre><code> $table-&gt;id();
              $table-&gt;unSignedBigInteger('admin_id')-&gt;unsigned();
              $table-&gt;unSignedBigInteger('user_id')-&gt;unsigned();
              $table-&gt;unSignedBigInteger('action_id')-&gt;unsigned();
             $table-&gt;foreign('admin_id')
                      -&gt;references('id')-&gt;on('admins');
              $table-&gt;foreign('user_id')
                      -&gt;references('id')-&gt;on('users'); 
              $table-&gt;foreign('action_id')
                      -&gt;references('id')-&gt;on('actions');
              $table-&gt;integer('point');
  </code></pre>