public function cdn(CdnRequest $request, $folder, $file)
    {
        $mode = 'resize';

        $width  = null;
        $height = null;

        $path = $folder.'/'.$file;

        if ($request->has('mode')) {
            $mode = $request->get('mode');
        }

        if ($request->has('width')) {
            $width = $request->get('width');
        }

        if ($request->has('height')) {
            $height = $request->get('height');
        }

        if ($request->has('w')) {
            $width = $request->get('w');
        }

        if ($request->has('h')) {
            $height = $request->get('h');
        }

        return app(PublicFolderCache::class)->cache($path, $width, $height, $mode);
    }
public function cdn(CdnRequest $request, $folder, $file)
    {
        $mode = 'resize';

        $width  = null;
        $height = null;

        $path = $folder.'/'.$file;

        if ($request->has('mode')) {
            $mode = $request->get('mode');
        }

        if ($request->has('width')) {
            $width = $request->get('width');
        }

        if ($request->has('height')) {
            $height = $request->get('height');
        }

        if ($request->has('w')) {
            $width = $request->get('w');
        }

        if ($request->has('h')) {
            $height = $request->get('h');
        }

        return app(PublicFolderCache::class)->cache($path, $width, $height, $mode);
    }
public function cdn ( CdnRequest $ request , $ folder , $ file ) { $ mode = 'resize' ; $ width = null ; $ height = null ; $ path = $ folder . '/' . $ file ; if ( $ request -> has ( 'mode' ) ) { $ mode = $ request -> get ( 'mode' ) ; } if ( $ request -> has ( 'width' ) ) { $ width = $ request -> get ( 'width' ) ; } if ( $ request -> has ( 'height' ) ) { $ height = $ request -> get ( 'height' ) ; } if ( $ request -> has ( 'w' ) ) { $ width = $ request -> get ( 'w' ) ; } if ( $ request -> has ( 'h' ) ) { $ height = $ request -> get ( 'h' ) ; } return app ( PublicFolderCache :: class ) -> cache ( $ path , $ width , $ height , $ mode ) ; }
Assets CDN endpoint.

@author Jonas Schwartz <josc@nodes.dk>
@author Pedro Coutinho <peco@nodesagency.com>

@param \Nodes\Assets\Http\Requests\CdnRequest $request
@param string                                 $folder
@param string                                 $file

@return mixed
Assets CDN endpoint .