title: PHP sets new value with if statment in foreach (Laravel)
body: <p>I'm using laravel if that could be the issue (I'm in the controller)
  So I have this code.</p>
  
  <p>If my $pool->status is etc OFFLINE it sets it to ONLINE.
  why is this happening?</p>
  
  <pre><code>foreach($pools as $pool){
          if ($pool-&gt;status = 'ONLINE') {
              $pool-&gt;cstatus = '
              &lt;i class="zmdi zmdi-shield-check zmdi-hc-lg text-success" data-toggle="tooltip" data-placement="right" title="" data-original-title="OK"&gt;&lt;/i&gt;
              ';
          }
          else {
              $pool-&gt;cstatus = '
              &lt;i class="zmdi zmdi-help zmdi-hc-lg text-muted" data-placement="right" title="" data-original-title="Status unknown."&gt;&lt;/i&gt;
              ';
          }
      }
  </code></pre>