CakePHP 3.2 Tutorials

Next: Building a CakePHP Cockpit UP: TOC

First we will use composer (www.getcomposer.org) to install CakePHP 3.3 with an empty app. Composer will also install all required packages for us.

cd /usr/local/www/logikfabrik/
composer create-project --prefer-dist cakephp/app cakephp3
Installing cakephp/app (3.3.1) - Installing cakephp/app (3.3.1) Downloading: 100% Created project in cakephp3 Loading composer repositories with package information Updating dependencies (including require-dev) - Installing aura/installer-default (1.0.0) Downloading: 100% - Installing cakephp/plugin-installer (0.0.15) Downloading: 100% - Installing psr/log (1.0.0) Downloading: 100% - Installing cakephp/chronos (1.0.0) Downloading: 100% - Installing mobiledetect/mobiledetectlib (2.8.22) Downloading: 100% - Installing psr/http-message (1.0.1) Downloading: 100% - Installing zendframework/zend-diactoros (1.3.6) Loading from cache - Installing aura/intl (1.1.1) Downloading: 100% - Installing cakephp/cakephp (3.3.3) Loading from cache - Installing symfony/yaml (v3.1.4) Loading from cache - Installing symfony/polyfill-mbstring (v1.2.0) Downloading: 100% - Installing symfony/console (v2.8.11) Loading from cache - Installing symfony/filesystem (v3.1.4) Loading from cache - Installing symfony/config (v3.1.4) Loading from cache - Installing robmorgan/phinx (v0.5.3) Downloading: 100% - Installing cakephp/migrations (1.6.3) Downloading: 100% - Installing nikic/php-parser (v0.9.4) Loading from cache - Installing psy/psysh (v0.1.11) Loading from cache - Installing jdorn/sql-formatter (v1.2.17) Downloading: 100% - Installing cakephp/debug_kit (3.3.3) Loading from cache - Installing cakephp/bake (1.2.8) Loading from cache cakephp/app suggests installing markstory/asset_compress (An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.) cakephp/app suggests installing phpunit/phpunit (Allows automated tests to be run without system-wide install.) cakephp/app suggests installing cakephp/cakephp-codesniffer (Allows to check the code against the coding standards used in CakePHP.) symfony/console suggests installing symfony/event-dispatcher () symfony/console suggests installing symfony/process () psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :)) cakephp/debug_kit suggests installing ext-sqlite (DebugKit needs to store panel data in a database. SQLite is simple and easy to use.) Writing lock file Generating autoload files > Cake\Composer\Installer\PluginInstaller::postAutoloadDump > App\Console\Installer::postInstall Created `config/app.php` file Set Folder Permissions ? (Default to Y) [Y,n]? Y Permissions set on /usr/local/www/logikfabrik/cakephp3/tmp/cache Permissions set on /usr/local/www/logikfabrik/cakephp3/tmp/cache/models Permissions set on /usr/local/www/logikfabrik/cakephp3/tmp/cache/persistent Permissions set on /usr/local/www/logikfabrik/cakephp3/tmp/cache/views Permissions set on /usr/local/www/logikfabrik/cakephp3/tmp/sessions Permissions set on /usr/local/www/logikfabrik/cakephp3/tmp/tests Permissions set on /usr/local/www/logikfabrik/cakephp3/tmp Permissions set on /usr/local/www/logikfabrik/cakephp3/logs Updated Security.salt value in config/app.php

After successful installation the directory structure looks as follows:

ls -altr cakephp3
-rw-r--r-- 1 root wheel 1202 Aug 27 01:32 phpunit.xml.dist -rw-r--r-- 1 root wheel 648 Aug 27 01:32 index.php -rw-r--r-- 1 root wheel 1445 Aug 27 01:32 composer.json -rw-r--r-- 1 root wheel 1015 Aug 27 01:32 README.md -rw-r--r-- 1 root wheel 623 Aug 27 01:32 .travis.yml -rw-r--r-- 1 root wheel 303 Aug 27 01:32 .htaccess -rw-r--r-- 1 root wheel 41 Aug 27 01:32 .gitignore -rw-r--r-- 1 root wheel 772 Aug 27 01:32 .gitattributes -rw-r--r-- 1 root wheel 329 Aug 27 01:32 .editorconfig drwxr-xr-x 2 root wheel 512 Sep 23 11:32 bin drwxr-xrwx 2 root wheel 512 Sep 23 11:32 logs drwxr-xr-x 2 root wheel 512 Sep 23 11:32 plugins drwxr-xr-x 8 root wheel 512 Sep 23 11:32 src drwxr-xr-x 4 root wheel 512 Sep 23 11:32 tests drwxr-xrwx 5 root wheel 512 Sep 23 11:32 tmp drwxr-xr-x 5 root wheel 512 Sep 23 11:32 webroot drwxr-xr-x 7 root wheel 512 Sep 23 11:32 .. -rw-r--r-- 1 root wheel 39780 Sep 23 11:32 composer.lock drwxr-xr-x 11 root wheel 512 Sep 23 11:32 . drwxr-xr-x 14 root wheel 512 Sep 23 11:32 vendor drwxr-xr-x 3 root wheel 512 Sep 23 11:32 config Next: Building a CakePHP Cockpit UP: TOC