|
3 | 3 | After you've downloaded the CakePHP application skeleton, there are a few top |
4 | 4 | level folders you should see: |
5 | 5 |
|
6 | | -- The *bin* folder holds the Cake console executables. |
| 6 | +- `bin` holds the Cake console executables so you can execute e.g. `bin/cake bake all`. |
7 | 7 |
|
8 | | -- The *config* folder holds the [Configuration](../development/configuration) files |
9 | | - CakePHP uses. Database connection details, bootstrapping, core configuration files |
| 8 | +- `config` holds the [Configuration](../development/configuration) files. |
| 9 | + Database connection details, bootstrapping, core configuration files |
10 | 10 | and more should be stored here. |
11 | 11 |
|
12 | | -- The *plugins* folder is where the [Plugins](../plugins) your application uses are stored. |
| 12 | +- `plugins` is where the [Plugins](../plugins) your application uses are stored. |
13 | 13 |
|
14 | | -- The *logs* folder normally contains your log files, depending on your log |
15 | | - configuration. |
| 14 | +- `logs` contains your log files, can be adjusted via [Log Configuration](../core-libraries/logging.md#logging-configuration). |
16 | 15 |
|
17 | | -- The *src* folder will be where your application’s source files will be placed. |
| 16 | +- `src` will be where your application’s source files like Controllers, Models, Commands etc. will be placed. |
18 | 17 |
|
19 | | -- The *templates* folder has presentational files placed here: |
| 18 | +- `templates` has presentational files placed here: |
20 | 19 | elements, error pages, layouts, and view template files. |
21 | 20 |
|
22 | | -- The *resources* folder has sub folder for various types of resource files. |
23 | | - The *locales* sub folder stores language files for internationalization. |
| 21 | +- `resources` is primarily used for the `locales` sub folder storing language files for static internationalization. |
24 | 22 |
|
25 | | -- The *tests* folder will be where you put the test cases for your application. |
| 23 | +- `tests` will be where you put the test cases for your application. |
26 | 24 |
|
27 | | -- The *tmp* folder is where CakePHP stores temporary data. The actual data it |
| 25 | +- `tmp` is where CakePHP stores temporary data. The actual data it |
28 | 26 | stores depends on how you have CakePHP configured, but this folder |
29 | 27 | is usually used to store translation messages, model descriptions and sometimes |
30 | 28 | session information. |
31 | 29 |
|
32 | | -- The *vendor* folder is where CakePHP and other application dependencies will |
33 | | - be installed by [Composer](https://getcomposer.org). Editing these files is not |
34 | | - advised, as Composer will overwrite your changes next time you update. |
| 30 | +- `vendor` is where CakePHP and other application dependencies will |
| 31 | + be installed by [Composer](https://getcomposer.org). **Editing these files is not |
| 32 | + advised, as Composer will overwrite your changes next time you update.** |
35 | 33 |
|
36 | | -- The *webroot* directory is the public document root of your application. It |
| 34 | +- `webroot` is the public document root of your application. It |
37 | 35 | contains all the files you want to be publicly reachable. |
38 | 36 |
|
39 | | - Make sure that the *tmp* and *logs* folders exist and are writable, |
40 | | - otherwise the performance of your application will be severely |
41 | | - impacted. In debug mode, CakePHP will warn you, if these directories are not |
42 | | - writable. |
| 37 | +Make sure that the `tmp` and `logs` folders exist and are writable, |
| 38 | +otherwise the performance of your application will be severely |
| 39 | +impacted. In debug mode, CakePHP will warn you, if these directories are not |
| 40 | +writable. |
43 | 41 |
|
44 | 42 | ## The src Folder |
45 | 43 |
|
46 | | -CakePHP's *src* folder is where you will do most of your application |
| 44 | +CakePHP's `src` folder is where you will do most of your application |
47 | 45 | development. Let's look a little closer at the folders inside |
48 | | -*src*. |
| 46 | +`src`. |
49 | 47 |
|
50 | | -Command |
| 48 | +### Command |
51 | 49 | Contains your application's console commands. See |
52 | 50 | [Command Objects](../console-commands/commands) to learn more. |
53 | 51 |
|
54 | | -Console |
| 52 | +> [!NOTE] |
| 53 | +> The folder `Command` is not present by default. |
| 54 | +> It will be auto generated when you create your first command using bake. |
| 55 | +
|
| 56 | +### Console |
55 | 57 | Contains the installation script executed by Composer. |
56 | 58 |
|
57 | | -Controller |
| 59 | +### Controller |
58 | 60 | Contains your application's [Controllers](../controllers) and their components. |
59 | 61 |
|
60 | | -Middleware |
| 62 | +### Middleware |
61 | 63 | Stores any [Middleware](../controllers/middleware) for your application. |
62 | 64 |
|
63 | | -Model |
64 | | -Contains your application's tables, entities and behaviors. |
| 65 | +### Model |
| 66 | +Contains your application's [Tables](../orm/table-objects.md), [Entities](../orm/entities.md) and [Behaviors](../orm/behaviors.md). |
65 | 67 |
|
66 | | -View |
67 | | -Presentational classes are placed here: views, cells, helpers. |
| 68 | +### View |
| 69 | +Presentational classes are placed here: [Views](../views.md), [Cells](../views/cells.md), [Helpers](../views/helpers.md). |
68 | 70 |
|
69 | | -> [!NOTE] |
70 | | -> The folder `Command` is not present by default. |
71 | | -> You can add it when you need it. |
0 commit comments