Home - mikemanila/cake GitHub Wiki

Baking with Cake
Conventions:
a) Controller class names are plural, CamelCased, and end in Controller. PeopleController and LatestArticlesController are both examples of conventional controller names.
b) CakePHP’s database configuration file is found in /app/Config/database.php.default
c) Turn off debug at /cake/blog/app/Config/core.php
d) Comment “Cake” at cake/blog/app/View/Layouts/default.ctp:
e) Please change the value of ‘Security.salt’ in APP/Config/core.php to a salt value specific to your application
f)


<div id="header">
    <h1><?php echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>

1) Creating the Blog Database
Next, let’s set up the underlying database for our blog. If you haven’t already done so, create an empty database for use in this tutorial, with a name of your choice. Right now, we’ll just create a single table to store our posts. We’ll also throw in a few posts right now to use for testing purposes. Execute the following SQL statements into your database:
/* First, create our posts table: */
CREATE TABLE posts (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
title VARCHAR,
body TEXT,
created DATETIME DEFAULT NULL,
modified DATETIME DEFAULT NULL
);

/* Then insert some posts for testing: */
INSERT INTO posts (title,body,created)
VALUES (‘The title’, ‘This is the post body.’, NOW;
INSERT INTO posts (title,body,created)
VALUES (‘A title once again’, ‘And the post body follows.’, NOW;
INSERT INTO posts (title,body,created)
VALUES (‘Title strikes back’, ‘This is really exciting! Not.’, NOW;


⚠️ **GitHub.com Fallback** ⚠️