//in blade: {{ ($data->position == 1) ? 'active' : 'disable'}} //in Controller $result = ($data->status == 1) ? 'active' : 'disable'