Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Now that Cake's been extracted, I'm going to use the Netbean's IDE to explore and configure Cake. I'm going to create a new project from existing sources, and for the sources folder, I'm going to browse to the sandbox directory on my desktop. And I explicitly put Netbean's metadata into a separate directory and click Finish. Over here on the left, I can see the directory structure of the project, and index.php was opened by default.
Scrolling to the bottom, let's see what it's doing. It defines a couple constants and determines where CakePHP is installed, then finally requires appwebrootindex.php. That's the actual front controller. This file's just here for convenience. I don't need to make any changes to index.php, so let's close it out and get to addressing those action items from the first run. There are a couple mark down files in the root directory. The read me provides some links to CakePHP resources and documentation.
Contributing describes how to get involved in the CakePHP project. The two build files are for describing cake to the pair package manager. HT access is an Apache webserver configuration file that, when we look at it, just directs requests to the app webroot directory. Nothing very fancy, just clean. I'll close it out. There are four directories in the CakePHP root. App is where all our custom application will go, including models, views, and controllers.
Also the public webroot directory is contained here, for example. I'll explore appin greater detail in a moment. Lib contains the core CakePHP libraries. Unless you're contributing to the Cake Project, don't make any edits in here because it makes it hard to maintain. Plugins are packaged combinations of models, views and controllers that perform specific functions. This directory is empty by default. An example of a plugin is debug_kit, which is helpful for development.
I'll demonstrate how to install it later. A directory of contributed plugins can be found at plugins.cakephp.org. Finally, the vendors directory is a placeholder for third party PHP libraries like GeSHi, the generic syntax highlighter. Out of the box this directory's empty. Same as plugins. Let's navigate into app. There's a number of directories here, but only two that matter right now. Config is where cake's configuration files reside. I'll make the changes that cake was requesting in a moment.
I'm going to search for the word, security.salt. This is a random string used for secure hashing. It doesn't really matter what it is, as long as it can't be guessed. The best practice is to change it to a unique random string or to use a password generator. I'm going to change it to too many secrets. You should choose something a little bit more secure. Underneath, there's a cipher seed that's used for encrypting and decrypting strings. In this case, it needs to be just numbers.
But again it doesn't really matter what it's set to as long as it can't be guessed. So I'm just going to set it to 31337. That's all I need for base security, so I'll save and close the core file. Back in the browser, when I refresh, the security errors have been sorted, but the database configuration is still not present. I could just copy the default template and make the necessary configuration changes, but instead, I'm going to set up and use another great feature, the CakePHP console.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 92758 Viewers
82 Video lessons · 104209 Viewers
71 Video lessons · 75850 Viewers
56 Video lessons · 107220 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.