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
2 answers

Cakephp 3 : Json render View not working

I've been trying to setup an Ajax Call in Cakephp 3.0.11. I've followed the explanation here : http://book.cakephp.org/3.0/en/views/json-and-xml-views.html Json enabled in routing (but i'm not really sure that's usefull) :…
Gael.D
  • 500
  • 1
  • 5
  • 16
4
votes
1 answer

How to use different datasources in a Query using cakephp3?

I'm working on a cakePHP3 project which does have 3 different datascources. I have one main model, called application, which should have two hasOne() associations to two models with a different datascource as Model Application. I have created the…
Seb
  • 145
  • 1
  • 13
4
votes
1 answer

CakePHP 3 Saving BelongsToMany Association Unknown type "" Error

I've been banging my head against the wall trying to figure out why my Emails (belongsToMany Guests (belongsToMany Emails)) won't save. When I attempt to save the email model with associated data (guests) it fails at $this->Emails->save($email)…
Alex Roman
  • 43
  • 4
4
votes
1 answer

Removing controller name from url does not work for more than one controller in cakephp

I want to remove controller name from url. It works for one controller but it does not work for more than one controller. Here is my code in Route.php: Router::connect('videos/:action', array('controller' => 'videos')); Router::connect('/:action',…
user4101645
4
votes
1 answer

cakephp multiple apps with same cake library and shared session

I was having cakephp running application as public website of our company, boss asked me to create another application for them to manage in-office activities using the same user-accounts and their privileges. On local development PC that project is…
alamnaryab
  • 1,480
  • 3
  • 19
  • 31
4
votes
2 answers

How to save multiple records in cakephp 3

I'm very new in cakephp 3. I want to save multiple records with multiple checkbox. I've some events in events table & some passwords in passwords table. I want to set different passwords under each events. For example- For event 1 I want to set…
biplob
  • 1,252
  • 1
  • 11
  • 29
4
votes
1 answer

How to add a field in database table by cakephp migration?

I am very new in cakephp version 3. Here I am trying to use migration plugin. I have already created a table by using below command => cake bake migration CreateUsers name : string It's worked very fine, now I am trying to add a field in here so…
Alimon Karim
  • 4,354
  • 10
  • 43
  • 68
4
votes
3 answers

cakephp 3 Allow user to edit only their profile

I am making a app with cakephp 3, my user have two roles, admin and student. The admin can access everything and the student just his profile. I done this part already, but i do not know how to restrict the students just to see his profiles and not…
Luis Martinez
  • 67
  • 1
  • 9
4
votes
3 answers

CakePHP: How do I count the number of hasMany records in a find?

I have two models, Post hasMany Comment. How do I select all Post that have less than two Comment? I tried using a find with 'fields'=>array('COUNT(Comment.id) as numComments','Post.*'), (and then doing a numComments < 2 in 'conditions'). But, I get…
atp
  • 30,132
  • 47
  • 125
  • 187
4
votes
3 answers

CakePHP 3.0 Where to put queries

I am trying to use the new CakePHP 3.0 and I am having a bit of trouble figuring out where to put the queries. Lets says we have something like this which is straight from their documentation. $articles = $this->Articles->find('all', [ 'fields'…
Beardslapper
  • 133
  • 1
  • 3
  • 10
4
votes
1 answer

How to change the Session cookie value in Cakephp

In my Cakephp application, i have a session cookie with the name 'my_cookie' and it contains some random value 'QSD5111AS552DNJK'. I observed that the value is same for the cookie (Before login and After login also). If i want to change the cookie…
Hareesh
  • 519
  • 2
  • 15
4
votes
1 answer

How to get id from $this->Auth->user() in cakephp?

i am trying to get user info of the already logged in user, i am using the following function, $info = $this->Auth->user(); //returns user info as an array and am able to get all the information regarding the user except it's id. but i am unable…
Amrinder Singh
  • 5,300
  • 12
  • 46
  • 88
4
votes
1 answer

How to include a php file from directory named "files" in CakePHP 1.3 folder structure?

I have CakePHP 1.3 setup like following app -config -controllers -lib -models -views -webroot -css -files -js Now to include a javascript file in my view file(.ctp) I know that i have to do echo…
Keyur Padalia
  • 2,077
  • 3
  • 28
  • 55
4
votes
1 answer

How to pass variable from controller to all view files (.ctp) in cakephp

My controller : Controller/appController/OrdersController.php I have a function named nocontact() and I can pass variable to nocontact.ctp as follows: $allNoContacts = $result; $service_charge=$this->ServiceCharge->find('all'); …
Abdus Sattar Bhuiyan
  • 3,016
  • 4
  • 38
  • 72
4
votes
1 answer

CakePHP v3: How to get patchEntity to update associations in request data

I'm using patchEntity() to update hasMany associations and it works fine. My problem is not related to the data that is saved in the DB. My problem is that the association data stored in the entity variable goes out of sync... Notice in the method…
emersonthis
  • 32,822
  • 59
  • 210
  • 375
1 2 3
99
100