Questions tagged [cakephp]

CakePHP is an open-source web, rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. It uses commonly known design patterns like MVC and ORM within the convention over configuration paradigm.

CakePHP

CakePHP is an MIT-licensed rapid development framework for that provides an extensible architecture for developing, maintaining, and deploying applications. It uses commonly-known design patterns like and within the "convention over configuration" paradigm.

##Security

CakePHP comes with built-in tools for input validation, protection, Form tampering protection, prevention, and prevention, helping you keep your application safe & secure.

##Hints

  1. To start learning this framework, there is a tutorial (CakePHP 3) / (CakePHP 2) included in its documentation. It is a very good introduction to the basics of CakePHP.

  2. Your question should name the CakePHP version you're using. Additionally it should contain a specific cake version, consider using the version-specific tag in addition to the major version tag.

##Versions

Active and stable branches

, , , , , , , , , ,

No longer supported versions

, , , , , , , , ,

##Plugins:

##Additional resources

  1. Manual https://book.cakephp.org
  2. API https://api.cakephp.org
  3. Video Tutorials https://tv.cakephp.org
  4. Articles https://bakery.cakephp.org
  5. Online Training https://training.cakephp.org/
  6. Plugins https://plugins.cakephp.org
  7. Releases https://github.com/cakephp/cakephp/tags
  8. Issues https://github.com/cakephp/cakephp/issues
  9. Inflector: https://inflector.cakephp.org/

##Get Support

  1. Slack https://cakesf.herokuapp.com/
  2. IRC https://webchat.freenode.net/?channels=#cakephp
  3. Forum https://discourse.cakephp.org/

Migration Guides If you are going to migrate from one major branch of CakePHP to another, you could check out this link and this link that lists migration guides.

31696 questions
4
votes
3 answers

Cakephp 3 : How to detect mobile in controller by requestHandler?

I need detect mobile in controller for a condition. I have tried below code in my controller. public function initialize() { parent::initialize(); $this->loadComponent('RequestHandler'); } Then I have written below code in index method if…
Satu Sultana
  • 527
  • 1
  • 11
  • 23
4
votes
1 answer

CakePHP 3. Containable select

I have a many to many relation where TrainingPrograms can contain many Exercises. They are a linked via the linktable ExercisesTrainingPrograms. I want to select certain fields from my exercises: $trainingPrograms = $this->TrainingPrograms->find() …
4
votes
1 answer

The correct way to convert php array

I have data array like $data = [ 'name' => [ (int) 0 => '095a108478345cac184f956b1e8dee91a5a89f87bbabd7b3fb4058f577adf.jpg', (int) 1 => '02059.jpg', (int) 2 => 'avatar.jpg' ], 'type' => [ (int) 0 =>…
Salines
  • 5,674
  • 3
  • 25
  • 50
4
votes
1 answer

Uploading an image to server using CakePHP 1.3

I'm currently stuck implementing image upload using CakePHP 1.3. I am using the dropzonejs library to handle upload and post request for the server, the documentation for this library states the following: Server side implementation Dropzone does…
Drae
  • 61
  • 5
4
votes
2 answers

Angular - CakePHP integration

OK - let me begin by saying that this is going to come off as a hand-me-down type of question. I am an experienced CakePHP developer and a complete newbie at Angular. I have a REST enabled backend written in CakePHP v3. I am now looking to create a…
ChicagoSky
  • 1,290
  • 3
  • 22
  • 50
4
votes
1 answer

How can I return a value from a CakePHP list array to use in a form?

I've been using CakePHP to develop an application and I have some basic permissions that are aimed to restrict the ability of the users and help to prevent errors. I have a form where someone with the a certain permission or higher can create a new…
Daniel
  • 189
  • 9
4
votes
2 answers

How to find out the version number in cakephp v3.0?

I have a set of code using cakephp v3 but don't know exactly which version of 3 it is based on. How can I find this out? EDIT: There is a somewhat duplicate question but not exactly the same. This question relates specifically to ver3
guagay_wk
  • 26,337
  • 54
  • 186
  • 295
4
votes
1 answer

Filter array to generate menu tree using php

$this->loadModel('Menu'); $this->loadModel('SubMenu'); $this->loadModel('SubSubMenu'); $options['joins'] = array( array('table' => 'sub_menus', 'alias' => 'sub_menus', 'type' =>…
user4101645
4
votes
1 answer

How to retrieve associations together with authenticated user data?

I have a Users table and a UsersProfiles table - the two are obviously related and the user table stores basic user_id, username, password while the users_profiles table stores firstname, lastname, job_title etc. In CakePHP 3, the call to…
ChicagoSky
  • 1,290
  • 3
  • 22
  • 50
4
votes
3 answers

Custom 404 page in CakePHP 3.X

I want to create one custom 404 page for all errors coming to the website for production environment. For example if I receive missing controller or view error then it will redirect to http://example.com/404.html, Also in some cases I will…
Anubhav
  • 1,605
  • 4
  • 18
  • 31
4
votes
1 answer

How to create multiple checkboxes grouped by fieldsets in Cakephp 3

I'm having a problem following this documentation : Cakephp3 Cookbook - Form - Creating Select Pickers I tried the 'multiple checkboxes' part : $options = [ 'Group 1' => [ 'Value 1' => 'Label 1', 'Value 2' => 'Label 2' ], …
Kadim Ahmed
  • 55
  • 1
  • 6
4
votes
3 answers

Cakephp 3 : Current password match in controller

I am trying to match current password before if change. For that I have taken Auth password and then I matched it with current password. But it's returning always false. Here is the controller code that I have tried if…
Alimon Karim
  • 4,354
  • 10
  • 43
  • 68
4
votes
2 answers

Encryption/Decryption of Form Fields in CakePHP 3

I want to have some form-fields encrypted when they are added/edited and decrypted when they are looked up by cake. Here is the code that works for me in v2.7.2: core.php Configure::write('Security.key','secretkey'); app/model/patient.php. public…
DanielHolguin
  • 305
  • 4
  • 13
4
votes
1 answer

Pass variables from element to view in CakePHP

I have a bulky array that is used in several views so I store it in an element file and fetch it when needed: element/select.ctp: $districts = array( __('Region A') => array( __('district 1') => __('district 1'), __('district 2')…
Alvin Mok
  • 323
  • 1
  • 14
4
votes
1 answer

CakePHP 3 Validate unique within two columns

I have a table of product sizes Product Details id product_id size 1 1 m 1 1 l 2 2 l If i try to add another detail to product 1 with size m it should return false but for product 2 size m should go…
artSir
  • 540
  • 1
  • 8
  • 29
1 2 3
99
100