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
0
votes
0 answers

Triggering events from Cakephp 3.X Components

Is it possible to trigger an event from a Cakephp 3.x Component? The below code, returns the following error: "Fatal error: Call to undefined method MyPlugin\Controller\Component\MyNewComponent::eventManager() in ... at line 190"
0
votes
1 answer

MySQL server has gone away Error in CakePHP

I'm working on CakePHP 3.2 My application was working fine earlier but from last few days giving error as Error: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away SQL Query SELECT Categories.id AS Categories__id, Categories.title …
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

echo buildrules errors in cakephp 3.2

I am trying to save the data but in error() it is not showing anything but still save() method returns false. After some research i figure out it is due to failure of buildRule public function buildRules(RulesChecker $rules) { …
0
votes
3 answers

what is difference between get or find in cakephp 3

What is difference b/w get or find in cakephp 3. Why we use get or find in cakephp 3 .
sourabh singh
  • 167
  • 1
  • 16
0
votes
0 answers

cakephp3 multiple database connections with plugin not loading

I am trying to load some data from a plugin model which uses a different database. I have added an entry in my config/app.php as follows: /** * The test connection is used during the test suite. */ 'alternate1' => [ …
0
votes
1 answer

CakePHP 3: Creating Bootstrap radio buttons with Form Helper

Whats the easiest way to get Bootstrap radio button structure using Form Helper. Desired structure is this:
I tried changing form templates(values like 'radio'…
datalore
  • 317
  • 1
  • 14
0
votes
2 answers

How to pass another parameter in limit of cakephp 3.2

I am using data table inbuilt ajax custom pagination. Here i need to pass 2 parameter in limit function . I need some help to make it possible .I am using cakephp 3.2. Below is my code. $sql.=" ORDER BY ".…
sradha
  • 2,216
  • 1
  • 28
  • 48
0
votes
1 answer

How to unlink the excel file after download in cakephp 3.2

I am doing an excel plugin for my project ,i want to unlink that excel file after the completion of download by the user or cancel by the user in the popup showing for the download. I have tried the unlink code to getting things done ,but as there…
sradha
  • 2,216
  • 1
  • 28
  • 48
0
votes
0 answers

csv file price format convertion in cakephp 3.2

I am using cakephp 3.2 csv plugin ,here i got everything what i supposed to need , but i want to make some modifications like want to add price format in the price showing in csv file(0.00). As it is directly coming from the db ,i am not getting any…
sradha
  • 2,216
  • 1
  • 28
  • 48
0
votes
1 answer

How to get multiple virtual field data in cakephp 3.2

I want two virtual field to be merged in the fetching records.But i have done it for only one virtual field,another one is returning null. I am quite confuse how to return two virtual field data.For one its coming fine. Below is the codes In…
sradha
  • 2,216
  • 1
  • 28
  • 48
0
votes
2 answers

Dynamically binding the select dropdown in cakephp

Hi guys I'm creating a form using cakephp. Here I've used a select dropdown. This dropdown is filled from the database. I have two tables, Branch and Employee. PrimaryContactID in Branch table is the foreign key. This select dropdown is filled with…
SSS
  • 703
  • 4
  • 11
  • 23
0
votes
1 answer

cakephp 3 matching only if row exists

I'm using CakePHP 3.2. I have three tables categories, products and seller_products I want to retrieve data from all tables, where seller_products.stock > 0 and seller_products.status = 1 also GROUP BY categories. This code is working fine $pros1 =…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

Using SQL Functions in cakephp3.2 ORM query builder is not working

I am trying to run a query through the query builder . So the query is running but I get incorrect result. The main problem is when I use the min() function I don't get correct result and even I tried to run the firstDue query alone but still there…
Fury
  • 4,643
  • 5
  • 50
  • 80
0
votes
1 answer

set value in controller to associated model befor save in cakephp

I have 'seller_businessestable andseller_business_categories` table. I am using a single form to save values to sellers and seller_businesses. The form is like Form->create() ?> Form->input('company_name') ?>
Gaurav
  • 131
  • 12
0
votes
1 answer

PHPExcel unable to read file

I'm using CakePHP 3.2 and PHPExcel library to import data from excel sheet to database. I have the library at /vendor/PHPExcel/Classes/PHPExcel.php /vendor/PHPExcel/Classes/PHPExcel/IOFactory.php and the action in controller is public function…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285