Questions tagged [cakephp-3.4]

Questions about the 3.4.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.4

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

Version 3.4.0 was released in February 2017.

Resources

138 questions
0
votes
1 answer

Overwriting default CSS and JS in CakePHP 3

How do I remove the current CSS files from CakePHP 3 and add my own? I have removed these codes from default.ctp: Html->css('base.css') ?> Html->css('cake.css') ?> fetch('script') ?> But still its showing the…
CodeLover1540
  • 101
  • 1
  • 10
0
votes
0 answers

How to unset 1 result in a query object in cakephp 3

I want to get data from a table, loop through it and "unset" some entities before passing it to the view. $shops = $table-find(); foreach ($shops as $shop) { if (condition 1) { unset($shop); // } } In the end I want to have a…
0
votes
1 answer

How to order by aggregate function results?

How to get result of below tables. catTbl catId, name 11 fruit 12 vegetable prodTbl pId | catTbl_catId | name 1 11 apple 2 11 orange 3 12 slag I want to get result for cat name total…
0
votes
1 answer

Auth deny not working in CakePHP 3

I'm using CakePHP 3.4. I want to restrict some action to non-admin users. This is what I tried in my controller public function beforeFilter(Event $event) { if (!$this->Auth->user('super_admin')) { $this->Auth->deny(['index', 'view',…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
2 answers

Force CakePHP plugin to use its own layout

I have written a CakePHP plugin https://github.com/anuj9196/CakePHP-App-Installer The plugin is using default.ctp layout from plugin_path/src/template/layout/default.ctp When there is some other theme used in the host application. Like in my case I…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

Ajax call returns undefined in Cakephp 3

I am trying to make an Ajax call from jquery form validation but it keeps returning undefined. I have tried searching for solutions in stack overflow but nothing helped. Here is my Ajax call: jQuery(document).ready(function() { var form =…
Disorder
  • 430
  • 1
  • 6
  • 16
0
votes
1 answer

filter on containable in CakePHP 3

I'm using CakePHP 3.4+ I have following tables and their association. PostVideos->belongsTo(Campaigns) || PostVideos has column campaign_id Campaigns->hasMany(ClientCampaigns) || ClientCampaigns has column…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

cakephp-3.4 immutable http\request api API

In cakephp 3.3 I could use statement like this in controller: $this->request->data = array_merge($this->request->query,$this->request->data); How can I achieve the same effect using new immutable http\request api API i n cake 3.4/3.5?
Amorphous
  • 779
  • 7
  • 27
0
votes
1 answer

Use Laravel Valet with CakePHP 3 returns 404 Not Found

From the Laravel documentation it says that CakePHP 3 works out of the box with laravel valet, however, I am getting a 404 Not Found, Is there something special I need to do other than valet park? Something along the lines of specifying the Valet…
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
0
votes
1 answer

CakePHP 3.5 w/ bootstrapui modal error dialog box

I'm using CakePHP 3.5 with FriendsOfCake bootstrapUI installed. On the login screen or after logout, a modal dialog error is displayed. The text is: mydomain.com says: ERROR: error forbidden There are no errors recorded in the error.log This also…
jhogarth
  • 19
  • 6
0
votes
1 answer

cakePhp 3.4 Authorization

I'm trying to save the views to count. it only saves the record when an authenticated user access this page. save fails when an Unauthenticated user access to this function. use Cake\ORM\TableRegistry; use Cake\Event\Event; public…
AmmarAli
  • 13
  • 1
0
votes
1 answer

build query in array for cakephp 3

I am writing an application with search functionalities. There are many filters to be applied so I want to build the filter query outside the find() function in CakePHP 3.4 Application This is what I want to achieve $start_year =…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

data not binding to Bootstrap table in cakephp 3.4

I am using cakephp 3.4 and bootstrap 3.3.7 versions. I am trying to load the bootstrap table with the data from the controller method. My code is In Controller method: public function test(){ $data = $this->User->find("all"); $this->set(array( …
user1134061
  • 55
  • 1
  • 9
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
0 answers

Cakephp 3.4 red velvet

I want to know about the cakephp 3.4 request cycle whether it is change or not according to previous versions of cakephp and please help me to understand cakephp request cycle easily.