What is CakePHP?
Example:
// echo 'Hello, CakePHP!';
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
WithoutBook brings subject-wise interview questions, online practice tests, tutorials, and comparison guides into one responsive learning workspace.
Know the top CakePHP interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Know the top CakePHP interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Search a question to view the answer.
Example:
// echo 'Hello, CakePHP!';
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// composer create-project --prefer-dist cakephp/app my_project
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// Inflector::pluralize('Article'); // Returns 'Articles'
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// Automatically handled by CakePHP
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// public $table = 'my_custom_table';
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// Configure::write('debug', 2);
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// = $this->Html->link('Click me', ['controller' => 'pages', 'action' => 'display', 'home']) ?<
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// class PostsController extends AppController {}
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// public function beforeFilter() {
// Code here
}
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// bin/cake bake model
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
//$articles = $this->Articles->find('all');
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// $this->loadComponent('Paginator');
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// public function validationDefault(Validator $validator) {
// Validation rules here
}
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// $articles = $this->Articles->find('all')->contain(['Authors']);
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// class Comment extends AppModel {
public $belongsTo = 'Post';
}
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// Form in the view
= $this->Form->create($article, ['type' => 'file']) ?<
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// public function beforeSave($options = []) {
// Code here
}
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// class Author extends AppModel {
public $hasMany = 'Book';
}
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// if ($this->request->is('ajax')) {
// Code for AJAX request
}
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// public function beforeRender() {
// Code here
}
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// public function beforeDelete($cascade = true) {
// Code here
}
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// $this->loadComponent('Session');
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// $email = new CakeEmail();
$email->to('recipient@example.com')->subject('Subject')->send('Message');
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// bin/cake bake migration CreateArticles title:string body:text
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// $this->loadComponent('Cookie');
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// $this->loadComponent('Paginator');
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// $this->loadComponent('Security');
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// $this->Articles->getConnection()->transactional(function () {
// Code here
});
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
// Creating a custom shell
bin/cake bake shell MyCustomShell
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.