CakePHP 3 - Best Practice and Cookbook

Next: Building Multilingual Webapps for CakePHP 3 UP: TOC

Installing CakePHP Glide

composer require admad/cakephp-glide
Using version ^1.0 for admad/cakephp-glide ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) - Installing psr/http-message (1.0) Downloading: 100% - Installing league/flysystem (1.0.22) Loading from cache - Installing guzzlehttp/psr7 (1.3.0) Loading from cache - Installing intervention/image (2.3.7) Loading from cache - Installing league/glide (1.0.0) Downloading: 100% - Installing admad/cakephp-glide (1.0.1) Loading from cache league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem) league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files) league/flysystem suggests installing league/flysystem-copy (Allows you to use storage) league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage) league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage) league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2) league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3) league/flysystem suggests installing league/flysystem-dropbox (Allows you to use Dropbox storage) league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching) league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib) league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter) intervention/image suggests installing ext-imagick (to use Imagick based image processing.) intervention/image suggests installing intervention/imagecache (Caching extension for the Intervention Image library) Writing lock file Generating autoload files > Cake\Composer\Installer\PluginInstaller::postAutoloadDump Configure::write('Glide', [ // Value of 'serverConfig' is passed as argument to Glide's ServerFactory::create() call. // 'serverConfig' => [ // Path or League\Flysystem adapter instance to read images from. // 'source' => WWW_ROOT . 'uploads/', // Path or League\Flysystem adapter instance to write cached images to. 'cache' => WWW_ROOT . 'cache', // Optional: URL part to be omitted from source path // 'base_url' => '/images/', // Optional: Response class for serving images. You normally don't need // to change this. By default an instance of \ADmad\Glide\Responses\CakeResponseFactory() // will be used. // 'response' => null, ], // Optional: Use secure URLs to prevent URL parameter manipulation. // 'secureUrls' => false, // Optional: Cache duration. This makes GlideFilter set appropriate cache headers. 'cache' => '+1 days', // Optional: Any response headers you may want to set 'headers' => [ 'X-Custom' => 'some-value', ] ]); Next: Building Multilingual Webapps for CakePHP 3 UP: TOC