Questions tagged [cakephp-3.2]

Questions about the 3.2.x branch of the CakePHP MVC framework. Use this tag in combination with the general [cakephp] tag. If your question applies to CakePHP more generally, use only the [cakephp] tag.

CakePHP 3.2

CakePHP is a PHP development framework using Associative Data Mapping, Front Controller and MVC design patterns.

Version 3.2.0 was released in January 2016.

Resources

145 questions
9
votes
1 answer

using array in WHERE IN in CakePHP

I'm working on CakePHP 3.2 I want to use an array in the query WHERE IN () The code is as $filter_p_t = $this->request->query('p_t'); $pros10 = $this->Products->find() ->where([ 'SellerProducts.stock >' => 0, 'SellerProducts.status' => 1, …
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
8
votes
4 answers

Cakephp 3 giving date and time fields in frozentime object

I am using cakephp 3.2 and when i am retrieving data by find query it is giving date fields in this format Array ( [0] => Cake\I18n\FrozenDate Object ( [date] => 2016-08-01 00:00:00 [timezone_type] => 3 [timezone] =>…
aman
  • 125
  • 1
  • 11
6
votes
2 answers

CakePHP 3 : Association property name clashes with field of same name of table

I am using CakePHP 3.2. I have two tables service_requests and coupon_history service_requests table CREATE TABLE `service_requests` ( `id` char(36) NOT NULL, `request_id` bigint(20) NOT NULL, `user_id` char(36) NOT NULL, `user_address_id`…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
5
votes
3 answers

Same table model association twice in cakephp 3.2

I have done model association in cake 3.2 Here i have done it for one id of same table . I have tried to do it for other one ,but its not working at all below is the flow. This output i am getting { "id": 1, "publisher_id": 133, "user_id":…
sradha
  • 2,216
  • 1
  • 28
  • 48
4
votes
2 answers

In cakephp 3 I got error Unexpected field in POST data

In cakephp 3 I got error Unexpected field in POST data. Actually that field is not in my table, but I want to use in controller.
Masud
  • 61
  • 1
  • 2
3
votes
1 answer

How to update multiple rows of a model?

I want to update multiple rows of a specific model at once, so I have bellow code and data structure. Whenever I tried to update the record every time record gets inserted instead of update. in my controller function products($cat_id = null){ …
bikash.bilz
  • 821
  • 1
  • 13
  • 33
3
votes
4 answers

RuntimeException : Cake\Cache\Engine\FileEngine is not properly configured in CakePHP 3

I have written an application in CakePHP 3.2 and recently uploaded to a dedicated server. But this is giving RuntimeException error as Cache engine Cake\Cache\Engine\FileEngine is not properly configured. Warning:…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
3
votes
1 answer

Find by conditions on associated model in CakePHP 3

I have two tables orders and sub_orders. Their association is $orders->hasMany('SubOrders', [ 'foreignKey' => 'order_id' ]); Both tables have invoice_no and sub_invoice columns in orders and sub_orders respectively. I have to find records from…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
3
votes
1 answer

redirect to another action with hidden or post parameter in cakephp 3

I'm working cakephp 3.2 I have to redirect from one action to another along with some data with it. The data to be transmitted is large and in a variable and also sensitive. Passing the data in parameter can be achieved by return…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
3
votes
1 answer

Sort by name in alphabetical order not working in data table

Here i have fetched the data from controller , all are coming fine (according to the alphabetical order) ,but in data table its not coming what i want to get ,means in alphabetical order while viewing . Here all the data in descending order by…
sradha
  • 2,216
  • 1
  • 28
  • 48
3
votes
1 answer

Linking same table with two foreign keys in cakephp 3

I have a table match_schedules which stores matches between two teams. There is table teams to store team information. Columns of match_schedules are +-----+---------+---------+-------+-------+ | id | team_a | team_b | date | venue…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
3
votes
1 answer

CakePHP 3 : Cookies tutorial

Is there any good tutorial on CakePHP 3 cookie component. I'm new to CakePHP and Cookie as well. I am writing an e-commerceapplication in CakePHP 3.2 and want to used Cookie to build shopping cart which can store item name, quantity, and price. Is…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
3
votes
1 answer

cakephp 3 login issue

I have tried all tutorials , all cakephp3 document but still i am facing login problem My code is : Appcontroller.php public function initialize() { $this->loadComponent('Flash'); $this->loadComponent('Auth', [ …
mikepr
  • 63
  • 4
3
votes
1 answer

How to Install CakePHP 3 in subdirectory

How do I install CakePHP 3 in a subdirectory? So far, I've only found that I should set my App.base variable in config/app.php file, but I've tried every path I can think of, but only get 500 error. Overview of how it should end up: User goes to…
Dave
  • 28,833
  • 23
  • 113
  • 183
2
votes
2 answers

Login redirecting in cakePHP 3.4

I'm trying to redirect to current page after logged in, using cakephp 3.4 but I'm getting like this localhost page isn't working, locahost page redirecting you too many times. Try clearing your cookies for 2 sec after that it's redirecting to…
Ashok
  • 184
  • 2
  • 14
1
2 3
9 10