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

How do I count unique page view count to my web page using Cakephp 3.0?

I'm trying to implement total unique page view count to my webpage, Any one knows that how to do that just give me an idea to implement using CakePHP 3.0
Kumar
  • 214
  • 2
  • 7
1
vote
1 answer

Intl and mbstring extension error is not showing in cakephp 3.2 in server

I am using cakephp 3.2 . Here my project is working on local perfectly . I have uploaded it to live server .In my server I have checked the phpinfo.php page and got that intl and mbstring extension is not enabled in the server ,but this two error…
sradha
  • 2,216
  • 1
  • 28
  • 48
1
vote
1 answer

How to do sum operation(sum a field) in associate table not in the parent table using cakephp 3.2 inbuilt sum functionality?

I want to sum up a field in cakephp 3.2. But the field is present in hasOne model association. I want to do it in the bind query . I have a order table and i am doing model bind with collection table . Here i want to sum up all the due_amount in…
sradha
  • 2,216
  • 1
  • 28
  • 48
1
vote
1 answer

Ajax Pagination backward move in cakephp 3

I am doing ajax pagination in cakephp 3.2 I have done code for forward move of pagination, by getting the last id . If i want to go backward ,the pagination will not work ,i know . How can i do it in a proper way so that it will work for both…
sradha
  • 2,216
  • 1
  • 28
  • 48
1
vote
1 answer

How to access virtual field in controller instead of model entity in cakephp 3.2

I have implemented virtual filed in model/entity/Order.php . But i want to access for one page only ,i don't want it to be called for all the functions .So in controller how can i access virtual field so that it will be applicable for only the…
sradha
  • 2,216
  • 1
  • 28
  • 48
1
vote
0 answers

Uploading image from one directory to another using php

I'm using CakePHP 3.2 and proffer plugin to upload images and generate thumbnails. Proffer plugin is working fine with images selected from input field type file. Now, I have a separate directory with images say products on the server and and image…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
1
vote
1 answer

CakePhp is returning HTML and BODY tags along with the json?

I am trying to return plain old JSON but for some reason it is being returned like this: { "token":"MTEyLSQyeSQxMCRHVS9nS2t2QVRVcGpJWjJGVERldXouWWJFTzgyZ0lCTURBZFIvdWs2RldGNm1IeWxxNGpTUw==", "user":{ …
Jeremy
  • 3,620
  • 9
  • 43
  • 75
1
vote
2 answers

Display data from two different tables in the index() using cakephp.

I've created a form where I need to display a table for which the data is coming from two different tables. The data is coming from Branch table. This Branch table contains a foreign key PrimaryContactID(int) which will contain the primary key of…
SSS
  • 703
  • 4
  • 11
  • 23
1
vote
1 answer

cakephp 3 matching not working

I have categories, products and seller_products table and want to select all from three tables group by categories where seller_products.stock > 0 and seller_products.status = 1 This is my code $pros1 = $this->Products->Categories->find() …
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
1
vote
1 answer

multiple select for hasMany association in CakePHP 3

I have two tables seller_businesses and seller_business_categories. and their association is as follows SellerBusinessesTable.php $this->hasMany('SellerBusinessCategories', [ 'foreignKey' => 'seller_business_id' …
Gaurav
  • 131
  • 12
1
vote
1 answer

cakephp multiple select not working

I have two tables 'businesses' and business_categories and their association is like BusinessesTable.php $this->hasMany('SellerBusinessCategories', [ foreignKey => 'business_id' ]); and I have to input multiple categories to business_categories…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
1
vote
2 answers

How to use Auth component of Cakephp 3 in Event

I'm using CakePHP 3.2 and proffer plugin for image uploading. I want to rewrite the default path of proffer plugin to upload image and change image name before save. As per the documentation of proffer from github. I have created an event in…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
1
vote
1 answer

cakephp event listener not found

I'm using Cakephp 3.2 and proffer plugin to upload images. By default the path of the image is as follows /media/files/// Each time a new row is inserted into same table a new folder is created by its primary…
Gaurav
  • 131
  • 12
1
vote
1 answer

How to use a custom theme for error pages?

I am developing an application which uses themes for layouts, and I need to use custom themes for all the error pages too. Looking at the docs, I see that I can change layout fairly easily by using $this->layout = 'mylayout'; in the error page…
ToX 82
  • 1,064
  • 12
  • 35
1
vote
0 answers

Cakephp hasOne relationship with finder

In the initialize function of OrdersTable.php, I have $this->hasOne('CurrentReview', [ 'className' => 'Reviews', 'finder' => 'latest', 'foreignKey' => 'order_id ]); and in ReviewsTable.php, I have public function findLatest(query…
cck
  • 193
  • 1
  • 14
1 2
3
9 10