CakePHP 3.2 Tutorials

UP: TOC

Let Bake some models

cd /usr/local/www/logikfabrik/cake3
bin/cake bake model
Welcome to CakePHP v3.3.3 Console --------------------------------------------------------------- App : src Path: /usr/local/www/logikfabrik.com/cakephp3/src/ PHP : 7.0.10 --------------------------------------------------------------- Choose a model to bake from the following: - Book - Chapter - Comment - Image - Newsletter - Tag - User
bin/cake bake model Book
Welcome to CakePHP v3.3.3 Console --------------------------------------------------------------- App : src Path: /usr/local/www/logikfabrik/cakephp3/src/ PHP : 7.0.10 --------------------------------------------------------------- One moment while associations are detected. Baking table class for BoBook... Creating file /usr/local/www/logikfabrik/cakephp3/src/Model/Table/BookTable.php Wrote `/usr/local/www/logikfabrik/cakephp3/src/Model/Table/BookTable.php` Deleted `/usr/local/www/logikfabrik/cakephp3/src/Model/Table/empty` Baking entity class for Book... Creating file /usr/local/www/logikfabrik/cakephp3/src/Model/Entity/Book.php Wrote `/usr/local/www/logikfabrik/cakephp3/src/Model/Entity/Book.php` Deleted `/usr/local/www/logikfabrik/cakephp3/src/Model/Entity/empty` Baking test fixture for Book... Creating file /usr/local/www/logikfabrik/cakephp3/tests/Fixture/BookFixture.php Wrote `/usr/local/www/logikfabrik/cakephp3/tests/Fixture/BookFixture.php` Deleted `/usr/local/www/logikfabrik/cakephp3/tests/Fixture/empty` Bake is detecting possible fixtures... Baking test case for App\Model\Table\BookTable ... Creating file /usr/local/www/logikfabrik/cakephp3/tests/TestCase/Model/Table/BookTableTest.php Wrote `/usr/local/www/logikfabrik/cakephp3/tests/TestCase/Model/Table/BookTableTest.php`
bin/cake bake controller books
Welcome to CakePHP v3.3.3 Console --------------------------------------------------------------- App : src Path: /usr/local/www/logikfabrik/cakephp3/src/ PHP : 7.0.10 --------------------------------------------------------------- Baking controller class for Books... Creating file /usr/local/www/logikfabrik/cakephp3/src/Controller/BooksController.php Wrote `/usr/local/www/logikfabrik/cakephp3/src/Controller/BooksController.php` Bake is detecting possible fixtures... Baking test case for App\Controller\BooksController ... Creating file /usr/local/www/logikfabrik/cakephp3/tests/TestCase/Controller/BooksControllerTest.php Wrote `/usr/local/www/logikfabrik/cakephp3/tests/TestCase/Controller/BooksControllerTest.php` UP: TOC