Skip to content

Instantly share code, notes, and snippets.

@ADmad
Created September 17, 2016 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ADmad/04d5e2551df187c56a72aeed7850bd99 to your computer and use it in GitHub Desktop.
Save ADmad/04d5e2551df187c56a72aeed7850bd99 to your computer and use it in GitHub Desktop.
<?php
namespace App\View\Helper;
use AssetCompress\View\Helper\AssetCompressHelper as BaseHelper;
use Cake\Core\Configure;
class AssetCompressHelper extends BaseHelper
{
public function css($file, $options = [])
{
if (Configure::read('debug')) {
return parent::css($file, $options);
}
return $this->Html->css('/cssc/' . $file, $options);
}
public function script($file, $options = [])
{
if (Configure::read('debug')) {
return parent::script($file, $options);
}
return $this->Html->script('/jsc/' . $file, $options);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment