CakePHP3 REST API Triggers only index method

I'm trying to build RESTful API using CakePHP3. The problem is no matter what type of HTTP request I'm sending to, it always launches the index method. My routes.php config: /** * REST Routes */ Router::scope('/articles', function (RouteBuilder $...
more »

2017-01-15 20:01 (1) Answers

Cakephp 3 belongsToMany subquery searching

I have a products table that belongsToMany Tags and Categories. The Tags and Categories also belongsToMany products. I am trying to implement a searching functionality that will include any products where the search parameters match tagged products...
more »

2017-01-14 20:01 (1) Answers

Error in CakePHP after changing path of Index

I'm working on a CakePHP project and have encountered a problem. We've written an Ajax function that sends data to a php function that adds a folder (in german: ordner) to a corresponding database. It worked perfectly fine but we wanted to move the ...
more »

2017-01-13 21:01 (1) Answers

Overriding route in Cakephp

I have one trouble in routing in CakePHP. I have index action of all customers. And the question is, is there a way to make it this way, when I go to /..../.../customers CakePhp renders index(as per default), but when I am going to /..../.../customer...
more »

2017-01-13 15:01 (1) Answers

Cakephp multi level relationship

I have four table course_schedules id name course_prices id price currency_id price_schedules id course_schedule_id course_price_id currencies id name code Course Schedule model Has many Price Schedules Course price Has many Price S...
more »

2017-01-13 06:01 (1) Answers

Cakephp 3 process code after page response

One of the requirements of the project I am working on is that I log the connections made to the site, due to the amount of processing being done to get as much information as possible I would like to process this after the page has been sent back to...
more »

2017-01-12 21:01 (1) Answers

Switch database on the fly in cakePHP3

I would like to switch to a secondary database for testing a specific function in a controller. All the solutions I came across on the web state that I should use ConnectionManager::alias('test', 'default'); Well, I did that but that doesn't seem to...
more »

2017-01-12 15:01 (1) Answers

how to do online test programming in cakephp

how to create multiple choice answer question in cakephp..i tried a lot but i don't have any idea on how todo this thing in cakephp.. i knowhow to do this in php and codeigniter..but in cakephp i have no idea on how to do question and answer program...
more »

2017-01-12 11:01 (0) Answers

CakePHP 2.9 + MongoDB Introduction

Am start connect to MongoDB with cake php. I have done cakephp2.2 with MongoDB but I need to connect to cakephp2.9 with MongoDB, I have complete all process and when and call to any controller it showing fatel error. Error: Class 'String' not found ...
more »

2017-01-12 10:01 (0) Answers

CakePHP v3 migrations plugin

I have notice bin/cake bake migration_diff [MigrationName] Returns long results always. For example: $this->table('attachments') ->changeColumn('file_name', 'string', [ 'default' => null, 'length' => 255, 'null' => fals...
more »

2017-01-12 09:01 (0) Answers

Reusable code for controller in Cakephp3

I would like to create reusable code in controller in "Cakephp way". I would like to replace always one field in few controllers before render website. For example I would like to replace string in field "body". I can do this like this in show method...
more »

2017-01-12 08:01 (3) Answers

Transaction in cakephp- 3.0

In my cakephp3.0 application registration page the registration data is inserting into two tables. I am using query builder for doing this. After the successful insertion of data into the first table(Projects table) projectId(primary key of Projects...
more »

2017-01-12 06:01 (0) Answers

Cakephp 3 dynamic validation error messages

I'm validating file uploads in my form and i want to know if it's possible to display a dynamic message using information from the form. This is my validation model: public function validationDefault(\Cake\Validation\Validator $validator) { $v...
more »

2017-01-11 22:01 (0) Answers