background preloader

Cake PHP

Facebook Twitter

21 Things You Must Know About CakePHP. Original >> Easily creating static pages I needed to create several pages that didn't use any models and contained static data inside the default layout.

21 Things You Must Know About CakePHP

My first thought was to create a controller for these pages and define an action for each static page I needed. However, this solution seemed tedious and would make it difficult to quickly add new pages. Enter the pages controller - simply create a view inside the views/pages/ folder and it'll automatically be rendered in /pages. Static pages - Adjusting the page title If you're using the pages controller and you need to change the page title, add the following to your view: <? Static pages - Adjusting other data sent to the layout If you need to send data to the layout (such as a variable indicating what section to highlight on the nav bar), add this to your view: <? That array should then be accessible as $somedata inside your layout.

Creating a simple admin center Viewing the SQL queries that are running behind the scenes Using bake.php. CakePHP: the rapid development php framework. Home. What is CakePHP? Why Use it? Improve this Doc CakePHP is a free, open-source, rapid developmentframework for PHP.

What is CakePHP? Why Use it?

It’s a foundational structure for programmers to create web applications. Our primary goal is to enable you to work in a structured and rapid manner–without loss of flexibility. CakePHP takes the monotony out of web development. It provides you with all the tools you need to get started coding and what you need to get done: the logic specific to your application. CakePHP has an active developer team and community, bringing great value to the project. Here’s a quick list of features you’ll enjoy when using CakePHP: Create, read, update and delete. Another variation of CRUD is BREAD, an acronym for "Browse, Read, Edit, Add, Delete".

Create, read, update and delete

DRULAB is also a variation, where "L" stands for Locking the access to the data (Delete, Read, Update, Lock, Add, Browse). This concept is mostly used in context with data protection concepts. Database applications[edit] The acronym CRUD refers to all of the major functions that are implemented in relational database applications. Each letter in the acronym can map to a standard SQL statement, HTTP method or DDS operation: Although a relational database provides a common persistence layer in software applications, numerous other persistence layers exist. User interface[edit] Create or add new entriesRead, retrieve, search, or view existing entriesUpdate or edit existing entriesDelete/deactivate existing entries Without at least these four operations, the software cannot be considered complete.

See also[edit] Notes[edit] Getting Started. Welcome to CakePHP.

Getting Started

You’re probably checking out this tutorial because you want to learn more about how CakePHP works. It’s our aim to increase productivity and make coding more enjoyable: we hope you’ll see this as you dive into the code. This tutorial will walk you through the creation of a simple blog application. We’ll be getting and installing CakePHP, creating and configuring a database, and creating enough application logic to list, add, edit, and delete blog posts. Here’s what you’ll need: A running web server. Let’s get started! Getting CakePHP First, let’s get a copy of fresh CakePHP code. To get a fresh download, visit the CakePHP project on GitHub: and download the latest release of 2.0 You can also clone the repository using git. git clone Regardless of how you downloaded it, place the code inside of your DocumentRoot. /path_to_document_root /app /lib /plugins /vendors .htaccess index.php README Tmp directory permissions $ chown -R www-data app/tmp Creating the Blog Database Note <!

<!