Questions tagged as 'cakephp-3'

2
answers

Problems with bake in CakePHP 3.x "Your database does not have any tables."

Greetings! I'm trying to generate models, controllers and templates in a CakePHP 3.x project using the PostgreSQL database. I already created the tables, I configured the connection (which is working, according to the default homepage of Cake),...
asked by 23.04.2017 / 03:08
1
answer

How to use 2 or multiple connections in CakePHP 3.x?

I'm doing a system where it takes information from 2 different databases, how can I get the data and differentiate them in the CakePHP 3.x controller and view? Thanks for the help.     
asked by 29.12.2016 / 16:52
0
answers

Two applications in the same application folder cakephp 3

I have an application that has two admin users: one admin for users of one system of registrations and another admin for system administrators. I'd like to have the following structure in cakephp3:    - > main folder (it's the root of t...
asked by 27.07.2016 / 01:38
1
answer

Query sql for cakephp

How do I query below in cakephp? SELECT * FROM tramitacaos INNER JOIN protocolos ON tramitacaos.protocolo_id = protocolos.id WHERE ( protocolo_id, data_origem ) IN ( SELECT protocolo_id, MAX( data_origem )...
asked by 05.04.2016 / 21:18
0
answers

CakePhp 3 menu with database data

I'm starting with CakePHP, using version 3. I am developing a blog, I need to insert in the layout a menu with the data of the database. (Category table) Ex: CategoryA | category | ... | Category Many thanks!     
asked by 13.02.2016 / 12:18
0
answers

CakePHP leave "action" and "template" more concise

I have some questions about how I can improve this "action" in my "controller":    Question discussed in: Post functional code in stackoverflow for refactoring? My template has a navigation bar with dynamic content (if the user is "...
asked by 02.12.2015 / 13:59
0
answers

failed to perform update in CakePHP

I'm trying to edit a record in CakePHP 3 and instead of editing it, it's inserting a new record. StatisticsController.php public function editar($ID){ $estatisticasTable = TableRegistry::get('Estatisticas'); $estatistica = $estatistic...
asked by 11.09.2015 / 15:34
1
answer

CakePHP3 HABTM error inserting data into table

I have the error Can not insert row in "addresses_companies" table, it has no primary key in my application, after entering a company and filling in the address data and selecting a company appears the error quoted above. Follow the code below...
asked by 24.08.2015 / 04:29
1
answer

Edit formatting of parameters passed by the CakePHP URL 3

I have a single field form, a input type="text" , when the form is submitted to URL it looks like this:    http://localhost:8765/products/search?search=notebook I would like it to look like this when you submit the form:...
asked by 03.08.2015 / 22:39
1
answer

MAX and MIN Functions in CakePHP 3

I'm trying to perform a search on the database that returns the smallest and greatest value of the 'time' field using the following code in CakePHP 3: $pedidos = TableRegistry::get('Pedidos'); $hora_max = $pedidos->find('list', array('field...
asked by 27.08.2016 / 06:10