How to send email to all user with condition using php laravel?
<p>I am using PHP Laravel v5.0. And I want to send email to all user where divisi = X. The query of $penerima shows 3 emails which divisi = X. But the email just sent to 1 email of 3 emails. Do you know which wrong of my code? thanks</p>

<pre><code>if ($approve != null){
        foreach ($approve as $X) {
            $penerima = User::select('email')
                             -&gt;where('divisi','=', $X)
                             -&gt;where('deleted','=', '0')
                             -&gt;get();

            Mail::send('mail', $data_nomor, function ($m) use ($penerima) {
                $m-&gt;to($penerima)-&gt;subject('Respond Reminder!');
            });
        }
    }
</code></pre>

<p>If I am showing the result of $penerima,  the result is </p>

<blockquote>
  <p>Illuminate\Database\Eloquent\Collection Object ( [items:protected] => Array ( [0] => App\User Object ( [table:protected] => users [hidden:protected] => Array ( [0] => password [1] => remember_token ) [connection:protected] => [primaryKey:protected] => id [perPage:protected] => 15 [incrementing] => 1 [timestamps] => 1 [attributes:protected] => Array ( [email] => hend0@gmail.com ) [original:protected] => Array ( [email] => hend0@gmail.com ) [relations:protected] => Array ( ) [visible:protected] => Array ( ) [appends:protected] => Array ( ) [fillable:protected] => Array ( ) [guarded:protected] => Array ( [0] => * ) [dates:protected] => Array ( ) [casts:protected] => Array ( ) [touches:protected] => Array ( ) [observables:protected] => Array ( ) [with:protected] => Array ( ) [morphClass:protected] => [exists] => 1 ) [1] => App\User Object ( [table:protected] => users [hidden:protected] => Array ( [0] => password [1] => remember_token ) [connection:protected] => [primaryKey:protected] => id [perPage:protected] => 15 [incrementing] => 1 [timestamps] => 1 [attributes:protected] => Array ( [email] => hsaput208@test.co ) [original:protected] => Array ( [email] => hsaput208@test.co ) [relations:protected] => Array ( ) [visible:protected] => Array ( ) [appends:protected] => Array ( ) [fillable:protected] => Array ( ) [guarded:protected] => Array ( [0] => * ) [dates:protected] => Array ( ) [casts:protected] => Array ( ) [touches:protected] => Array ( ) [observables:protected] => Array ( ) [with:protected] => Array ( ) [morphClass:protected] => [exists] => 1 ) [2] => App\User Object ( [table:protected] => users [hidden:protected] => Array ( [0] => password [1] => remember_token ) [connection:protected] => [primaryKey:protected] => id [perPage:protected] => 15 [incrementing] => 1 [timestamps] => 1 [attributes:protected] => Array ( [email] => diae@test.co ) [original:protected] => Array ( [email] => diae@test.co ) [relations:protected] => Array ( ) [visible:protected] => Array ( ) [appends:protected] => Array ( ) [fillable:protected] => Array ( ) [guarded:protected] => Array ( [0] => * ) [dates:protected] => Array ( ) [casts:protected] => Array ( ) [touches:protected] => Array ( ) [observables:protected] => Array ( ) [with:protected] => Array ( ) [morphClass:protected] => [exists] => 1 ) ) )</p>
</blockquote>

<p>if I changed the get() into pluck('email'), the result is just </p>

<blockquote>
  <p>hsaput208@test.co</p>
</blockquote>