Created
September 17, 2016 20:42
-
-
Save ADmad/04d5e2551df187c56a72aeed7850bd99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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