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