public function css($attributes = null)
{
if (!$this->css) {
return '';
}
$assets = $this->pipeline ? array($this->cssPipeline()) : $this->css;
if ($attributes instanceof Closure) {
return $attributes->__invoke($assets);
}
// Build attributes
$attributes = (array) $attributes;
unset($attributes['href']);
if (!array_key_exists('type', $attributes)) {
$attributes['type'] = 'text/css';
}
if (!array_key_exists('rel', $attributes)) {
$attributes['rel'] = 'stylesheet';
}
$attributes = $this->buildTagAttributes($attributes);
// Build tags
$output = '';
foreach ($assets as $asset) {
$output .= '<link href="' . $asset . '"' . $attributes . " />\n";
}
return $output;
}