Questions tagged as 'cakephp'

1
answer

edit values by json cake php

I have this as httpclient in cakephp I have this value in my index to be sent to edit, everything is fine here. <?php foreach ($valor->articles as $article): ?> <tr> <td><?= $article->id ?></td> <...
asked by 27.06.2018 / 23:02
1
answer

Receive url cake php [duplicated]

I want to know how to do the following: When the page comes from google, I want to change the page if the page is found from the google search engine, and to show another one if the url is entered manually     
asked by 28.03.2018 / 17:43
1
answer

Include new field in query find () CAKEPHP

I have included a new boolean field in a wine table, dist_exclusiva , I have also created the field in the creation and editing form. I have the problem when the queries are executed, it does not pick up the new field, the query seems pred...
asked by 29.01.2018 / 16:31
1
answer

Validate data when required in cakePHP 3

I have been with this situation for a week and I can not find information on the subject, the following happens, I have a form that has controls that are shown when required, for example, my application registers a match between two players and...
asked by 03.02.2018 / 21:59
2
answers

Error Undefined offset in PHP (Create table with stored procedure result)

I need to print the sales of the operators of each day, we do not take into account the holidays on weekends. I get the following error    Notice (8): Undefined offset: 1 [APP / View / Reports / getventas_asistencia.ctp, line 63]       Not...
asked by 18.01.2018 / 21:42
1
answer

Modify session variable in onclick

I have 2 images, the idea is that when I click on one of them, I save the associated category in a session variable. I searched for information and tried with ajax, but mysteriously it returns ... code ... not the variable, that is ... something...
asked by 24.01.2017 / 16:30
1
answer

Create function to query the existence of data in a generic way

public function consultar_existencia($campo) { if ($this->request->is('post')) { $this->autoRender = false; $this->layout = false; $this->loadModel('Client'); $existe = $this-...
asked by 19.06.2018 / 17:32
1
answer

Cakephp 3: sort main table by sub table field (contain)

I need to know if it is possible to sort the "sales" table by the "date" field of the related "SaleBooking". $query = $this->_salesTable->find() ->where([ 'product_id IN' => $ids, 'st...
asked by 31.05.2018 / 20:09
1
answer

Make inquiry Httpclient Cakephp

I am making a specific query to a value, I have a group of articles and I want to see only one article. Seeing the Cakephp manual shows me this but I do not know how to use it. $response = $http->post('http://example.com/api', http_build...
asked by 29.06.2018 / 17:15
2
answers

Ajax does not reach the controller in cakephp

Hello, I have the following codes: Routes Router::connect('/', array('controller' => 'pages', 'action' => 'home', 'home')); Router::connect('/post', array('controller' => 'Posts', 'action' => 'display', 'Posts/index')); Router::con...
asked by 28.04.2018 / 00:56