whereNotNull('data') ->get(['value', 'data']) as $color) { $data = json_decode($color->data); if ($data->name) { $response .= '--' . $data->name . ':' . $color->value; if (isset($data->suffix)) { $response .= $data->suffix; } $response .= ';'; } } $response .= '}'; return response($response)->header('Content-Type', 'text/css; charset=utf-8'); } }