public function getImage($template, $filename)
    {
        $template = $this->getTemplate($template);
        $path = $this->getImagePath($filename);

        // image manipulation based on callback
        $manager = new ImageManager(Config::get('image'));
        $content = $manager->cache(function ($image) use ($template, $path) {

            if ($template instanceof Closure) {
                // build from closure callback template
                $template($image->make($path));
            } else {
                // build from filter template
                $image->make($path)->filter($template);
            }

        }, config('imagecache.lifetime'));

        return $this->buildResponse($content);
    }
public function getImage($template, $filename)
    {
        $template = $this->getTemplate($template);
        $path = $this->getImagePath($filename);

        // image manipulation based on callback
        $manager = new ImageManager(Config::get('image'));
        $content = $manager->cache(function ($image) use ($template, $path) {

            if ($template instanceof Closure) {
                // build from closure callback template
                $template($image->make($path));
            } else {
                // build from filter template
                $image->make($path)->filter($template);
            }

        }, config('imagecache.lifetime'));

        return $this->buildResponse($content);
    }
public function getImage ( $ template , $ filename ) { $ template = $ this -> getTemplate ( $ template ) ; $ path = $ this -> getImagePath ( $ filename ) ; // image manipulation based on callback $ manager = new ImageManager ( Config :: get ( 'image' ) ) ; $ content = $ manager -> cache ( function ( $ image ) use ( $ template , $ path ) { if ( $ template instanceof Closure ) { // build from closure callback template $ template ( $ image -> make ( $ path ) ) ; } else { // build from filter template $ image -> make ( $ path ) -> filter ( $ template ) ; } } , config ( 'imagecache.lifetime' ) ) ; return $ this -> buildResponse ( $ content ) ; }
Get HTTP response of template applied image file

@param  string $template
@param  string $filename
@return Illuminate\Http\Response
Get HTTP response of template applied image file