Questions tagged [cakephp-3.1]

Questions about the 3.1.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.1

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

Version 3.1.0 was released in September 2015.

Resources

109 questions
0
votes
1 answer

Using plugin model for non-plugin controller

I have two separate CakePHP 3.1 apps that each use the same database, but display the information in very different ways. To reduce code duplication, I'm extracting most of the models into a plugin. The controllers differ wildly from each other, so…
paran
  • 69
  • 8
0
votes
2 answers

How to make cakephp 3 url ready for marketing?

I am new for cakephp. I am trying to rewrite the url to make it SEO friendly. I have create module in cakephp3 for cms page. Page Table - url field would like to use as "about-us" CREATE TABLE IF NOT EXISTS `pages` ( `id` int(11) NOT NULL, …
0
votes
0 answers

How to put begin-commit transaction in controller: cakephp 3.1?

I want to apply transactions but only for this request.is it any impact on insert , update on other table by other users at same. $conn = ConnectionManager::get('default'); $conn->begin(); try{ //code here …
Basant Rules
  • 785
  • 11
  • 8
0
votes
0 answers

How to Create Custom Field Types w/ CakePHP 3.0

Is there a way you can create custom field types with CakePHP 3.0? Do you do it via PHPMyAdmin or a Bake Plugin. I want to do it for custom fields for this custom portal I been working on that is built off of Cake's Bookmarker tutorial? Any…
ConfusedDev
  • 31
  • 2
  • 7
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
1 answer

Cakephp 3.1 - How to redirect based on query string values?

We recently updated our site from pure php to cakephp 3 and having trouble redirecting urls that have params to a new url. For example this redirect works fine $routes->redirect('/webcast.php', '/webcast', ['status' => 302]); But if there's…
robb
  • 294
  • 2
  • 14
0
votes
1 answer

CakePHP 3.x multiple file upload not working

When using the line: Form->input('ad_photos[]', ['type' => 'file', 'multiple' => true, 'label' => 'Add Some Photos']); ?> The form won't even submit. It is like the page gets reloaded. This code use to work. Also, if I use ad_photos.…
Battousai
  • 503
  • 7
  • 17
0
votes
1 answer

Override Cakephp 3.1 data type using typeMap()

When I have a query: $jobs = $this->Jobs->find('all', [ 'fields' => [ 'id', 'existingdatetime', 'newdatetime' => '"2016-05-10 16:12:10"', ], ]); The existingdatetime is returned as a DateTime object, while the…
sverreg
  • 235
  • 4
  • 13
0
votes
1 answer

Cakephp 3 best coding practice for model functions

I have a current_day_users table and users table.What is the better coding practice between the following to extract data from current_day_users: 1.UsersTable.php code …
user727728
  • 733
  • 2
  • 8
  • 21
0
votes
0 answers

Get IP address in cakephp 3.2

Here i want to find the ip address of system,which i want to implement. but i stucked here. I am using cakephp version 3.2. i have worked on it ,getting an incomplete ip ::1,while my machine ip is 155.0.0.1 Below is code for getting ip echo…
sradha
  • 2,216
  • 1
  • 28
  • 48
0
votes
1 answer

CakePHP3 Plugin cell is missing

My Process make plugin cell $ bin/cake bake plugin Abc $ bin/cake bake cell Abc.New upper process make 3 files plugins/Abc/src/View/Cell/NewCell.php plugins/Abc/src/Template/Cell/Menu/display.php and test file. insert…
0
votes
1 answer

cakephp 3.x how to use session in model?

We are developing shopping cart application. Our application we are merging the cart items with login user when user logged in. So can you please help me how to use Session inside the model
venkat
  • 11
  • 1
  • 6
0
votes
1 answer

requestAction shows a blank page in CakePHP 3.1

I am using CakePHP 3.1 and whenever I make use of requestAction, the page goes blank while I get an error in the console. The basic code is:- $test = $this->requestAction('/dockets/find'.$articleList->id, [], ['return']); While the dummy…
Fahad Sadiq
  • 77
  • 2
  • 11
0
votes
1 answer

CakeDC Users Plugin: Disable/Override Username Validation

How to configure CakeDC's Users plugin to override/disable the username field? I have reconfigured the plugin to use 'email' field as username for login - and it works great for login - but I no longer need the username field validation in the…
0
votes
1 answer

How create a grouped structure based off of a field in a query result?

I am trying to group by Year in cakephp3. I am able to get data using following way, but it's not still grouped by year(The way I want.) $query = $this->Alerts->query(); $year = $query->func()->year([ 'added_on' => 'literal' ]); $month =…