CakePHP Blog Tutorial
This project is the result of the tutorial step-by-step Official CakePHP website. It is a way to practice and study the new version of CakePHP 3.x., (*1)
Basically CTRL+C
CTR+V
of site, with some minor changes, such as adding the Migration., (*2)
Installation
composer create-project maiconpinto/cakephp-blog-tutorial
, (*3)
OR, (*4)
composer create-project --prefer-dist maiconpinto/cakephp-blog-tutorial [app_name]
, (*5)
Learn to use the composer, it is an essential tool. Official website and if you want I have a friend who provided free course composer in practice, the Erik Figueiredo of website webdevbr.com.br, (*6)
Configuration
mv config/app.default.php config/app.php
, (*7)
Edit file., (*8)
//config/app.php
'Datasources' => [
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
/**
* CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
* the following line and set the port accordingly
*/
//'port' => 'non_standard_port_number',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_SECRET',
'database' => 'YOUR_DATABASE',
'encoding' => 'utf8',
'timezone' => 'UTC',
'flags' => [],
'cacheMetadata' => true,
'log' => false,
Migrations
After installing and configuring the database, let's run the migration to create the tables., (*9)
bin/cake migrations migrate
, (*10)
Useful links
Tutorials & Examples, (*11)
Blog tutorial, (*12)
Blog tutorial - Part 2, (*13)
Blog tutorial - Part 3, (*14)
Blog Tutorial - Authentication and Authorization, (*15)