Most voted "cakephp-3" questions
Cakephp 3 is a framework for web development in PHP. Cakephp 3 is currently supported in versions equal to or greater than PHP 5.4. If the doubt isn’t about Cakephp 3, don’t use this tag, even if you’re using Cakephp 3 in your project.
Learn more…71 questions
Sort by count of
-
5
votes2
answers695
viewsPHP Matrix How to Fill
Guys want to fill this matrix. It works but when I try to put more than one result in the same line only the last one appears. How to fix? <h1>Mapa</h1> <?php $linha=0; $coluna=0;…
-
4
votes1
answer397
viewsHow to make a website homepage using Cakephp 3.0
How should a website homepage be done using the Cakephp 3.0 (3.0.3) Framework? This page has dynamic content. What this page consists of: It is a display page of major products and product…
-
4
votes2
answers210
viewsDifference between table, Entity and behavior
What’s the difference between table, Entity and behavior in the context of Model? For example, I have a table called module, I want to make a query like this $modulo = TableRegistry::get('Modulo');…
-
4
votes0
answers571
viewsHow to call a function in Cakephp 3.x
I have a view add which is an open form called help desk (referring to function add, of course), and I have this function upload which is to attach file to request, which is linked with a Component,…
-
3
votes1
answer3367
viewsGenerate menu and submenu with PHP
Situation: I am building a menu with submenu of information that retrieves from the database, these data are categories and subcategories of products, this menu is ready and working but when there…
-
3
votes1
answer410
viewscheckbox "select all" jquery and Cakephp
Hi, I have one foreach in a table that lists several checkboxes. I need to do a function jquery that by clicking on the checkbox of <th> selecione todos the next checkboxes <td>. Look at…
-
2
votes0
answers95
viewsHow to insert async and Defer attributes without the value with Cakephp 3?
I’m using the PHP Cakephp Framework 3.0.3 and would like to know how to insert the keywords Defer and async script tags and omit values: How script insertion is done with the framework: <?=…
-
2
votes1
answer222
viewsWhere Appropriate to Allocate Javascript and CSS Libraries in Cakephp 3
What is the appropriate location to allocate libraries and plugins Javascript and CSS in Cakephp 3, as there has been a major change in the directory structure from this release to earlier. All…
-
2
votes1
answer80
viewsPHP build-in class does not work in Cakephp 3.0
I’m trying to use a class Built-in of PHP inside Cakephp but a: Error: Class 'App Controller Component Datetime' not found Where it’s being used: public function listNewBanners($newBannersQuantity)…
-
2
votes1
answer70
viewsResolve Undefined namespace Mailer Cakephp 3.0.3
I’m trying to create a Email Reusable provided by Cakephp 3 but still following the documentation but I have the following error: use Cake\Mailer\Mailer; Error: Undefined namespace Mailer Referenced…
-
2
votes1
answer75
viewsPlugin cakephp-file-Storage 3.0 does not run and does not display Error
Following the installation tutorial of cakephp-file-Storage 3.0 plugin (which aims to give you the possibility to upload and store files in virtually any type of backend storage) but did not succeed…
-
2
votes1
answer179
viewsAccess method using Dash (-) in Cakephp URL 3
I have a signature method: public function mostPopular() I’m trying to access it via URL as follows: products/most-popular but I am being directed to a Error page: The action Most-popular is not…
-
2
votes1
answer72
viewsLeave Component Following Cakephp’s Pattern
How can I improve this Cakephp 3.0 Component (inside the controller folder) Question discussed in: Post functional code in stackoverflow for refactoring? first: to use external libs (stored in…
-
2
votes0
answers57
viewsCakephp "action" with multiple functions
I have a few points on how I can improve this "add action" (method) in my "controller": Some descriptions: In the system the user can upload aProduct in a single form, in the system a Product is…
-
2
votes1
answer177
viewsSum data with database values. Cakephp 3.0
I need to do a calculation that sums an integer to a date. This integer refers to days. $user = TableRegistry::get('PoliticaSenha'); $query = $user->find()->where(['id' =>…
-
2
votes1
answer955
viewsHow to translate cakephp 3
I managed the default pot. , created the folder pt_BR in: http://book.cakephp.org/3.0/en/console-and-shells/i18n-shell.html /src/Locale/pt_BR/default.po and put in config/app.php 'defaultLocale'…
-
2
votes0
answers60
viewsIs there any way to run a Seed only once?
I use the Cakephp 3 framework, I was researching on Migrations and Seeds and I did some testing, the Migrations they run only once on account of the Sphinx log table, but if I do a Seed and call it…
-
1
votes1
answer42
viewsDelete WHERE clause if passed Zero or Cakephp 3.0
I’m working with the CakePHP 3.0 and created a query for his ORM, this query is working perfectly but now I need that if a certain parameter is 0 or nothingness is passed to the class method where…
-
1
votes1
answer266
viewsReturn records from a table whose key is referenced in another Cakephp 3
I’m using the ORM native of Cakephp 3 to retrieve the product table records (through the ID) along with the records that references it with the following method: public function view($id) {…
-
1
votes0
answers62
viewsCakephp 3 menu with database data
I’m starting at Cakephp, using version 3. I am developing a blog, I need to insert in the layout a menu with the database data. (Table categories) Ex: Categorya | category | ... | Category Thank you…
cakephp-3asked 8 years, 9 months ago Emerson Dias 11 -
1
votes1
answer255
viewsQuery 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(…
-
1
votes1
answer227
viewsEdit formatting parameters passed by Cakephp URL 3
I have a unique field form, a input type="text", when the form is submitted to URL is as follows: http://localhost:8765/products/search?search=notebook I would like it to be as follows when…
-
1
votes1
answer136
viewsChange Admin access URL
Guys, here’s the deal: I create several sites and systems, and most of them have an administrative area. I do until then in the basics of being "urldosite.com.br/admin". Now, for safety’s sake as…
-
1
votes1
answer167
viewsHow to use 2 or multiple connections in Cakephp 3.x?
I’m making a system where it takes information from 2 different databases, how can I take the data and differentiate it into the controller and view of Cakephp 3.x? Thanks for the help.
-
1
votes1
answer94
viewsCakephp3 HABTM error inserting data into table
I am with the error Cannot 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…
-
1
votes0
answers38
viewsfailed to update Cakephp
I’m trying to edit a record in Cakephp 3 and instead of editing the system, it’s inserting a new record. Staticscontroller.php public function editar($ID){ $estatisticasTable =…
-
1
votes0
answers117
viewsCakephp makes "action" and "template" more concise
I have some questions about how I can improve this "action" (method) in my "controller": Question discussed in: Post functional code in stackoverflow for refactoring? Man template has a navigation…
-
1
votes2
answers133
viewsCakephp - 1~n ratio
Good evening, I’m having a hard time on Cakephp 3 and the problem is this:: Cannot Insert Row, some of the Primary key values are Missing. Got (, ), expecting (idstorie, users_iduser) The system…
-
1
votes1
answer22
viewsHow to start Cakephp3.x
I’m getting agr with the cakephp, I followed the bookmarker tutorial, but is there any material with a simple didactic, explaining the concepts, which are used in cake? I see youtuber using the…
-
1
votes1
answer320
viewsHow to fix error Impossible to generate condition with Empty list of values for field (Tags.title)
I’m playing with cakephp 3 by doing the Cookbook bookmarker tutorial. I am implementing the action in the bookmarks/tags controller, but when trying to access the error of the question title:…
-
1
votes1
answer105
viewsupdate mysql attribute according to a day (12/12/2019) cakephp, mysql
I have the following problem: If a client does not pay a certain portion, he would like the system (mysql+cakephp) to place the client with the debtor status. would have some way to automate this,…
-
1
votes1
answer354
viewsCreating cakephp route 3
Intent: access http://localhost/api/users/[action] created the route Router::scope('/api', function (RouteBuilder $routes) { $routes->extensions(['json']); $routes->resources('Usuarios'); });…
-
1
votes0
answers40
viewsTwo applications in the same cakephp 3 application folder
I have an application that has two administrators: an admin for users of a registration system and another admin for system administrators. I would like to have the following structure in cakephp3:…
cakephp-3asked 8 years, 4 months ago Julio Azevedo 11 -
1
votes1
answer286
viewsCakephp 3 - How to do rollback
In cakephp 2 in birds transactional with $data_source->begin(); ,$data_source->commit();, or $data_source->rollback();. So when I needed to insert into more than one table, and the data was…
-
1
votes2
answers145
viewsProblems 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’ve already created the tables, set up the connection (which is working…
-
1
votes0
answers463
viewsHow to break the caption line on Google Charts
In the Image 1 (below), shows a template of how I want the caption to look. In the Image 2 (below), shows how it is coming out (in case, no line break). Question How do I break the caption’s line on…
-
1
votes0
answers64
views"Missing Template" when trying to use Jsonview in Cakephp 3
I am trying to create a Jsonview response to my application. I followed the steps described in the manual https://book.cakephp.org/3.0/en/views/json-and-xml-views.html, but I keep getting the bug…
-
1
votes0
answers210
viewsUnknown server error after updating the cake vendor folder
While updating files from my vendor folder on the server I had the following errors: Fatal error: Call to Undefined method Cake View Widget Selectboxwidget::outputError() in…
-
1
votes1
answer101
viewsHow to sort the results more similar to the parameter passed?
I have a table in my system that stores all airports and in a select autocomplete i have this list where I can search. The problem is that I can search for "nome", "cidade", "país" and "IATA" and…
-
1
votes1
answer40
viewsFailure to pass html menu to Cakephp
In the link below I have a Menu working perfectly in Codepen as link below: https://codepen.io/FabricioDev/pen/JOmjEg Beginning of CSS #DPrincipais { display: block; } #TrabalhoRendimento { display:…
-
0
votes1
answer354
viewsUse cmd commands in shell scripts - cakephp 3.0
I was wondering if you can use native windows CMD commands from scripts made to run in the cakephp shell. I already run tasks that run in cmd, but with the commands of the framework itself but would…
-
0
votes1
answer298
viewsrequestAction Cakephp 3
Good afternoon, I would like a help to make a requestAction on Cakephp 3, before on cake2 I did so: <?php $post = $this->requestAction('/Posts/latest'); foreach ($post as $value) : ?>…
-
0
votes1
answer57
viewsMAX and MIN functions in Cakephp 3
I am trying to perform a database search that returns the lowest and highest value of the 'time' (time) field using the following code in Cakephp 3: $pedidos = TableRegistry::get('Pedidos');…
cakephp-3asked 8 years, 2 months ago Max Porcento 157 -
0
votes1
answer49
viewsCakebake generating invalid Controller
I am generating a controller for cakebake based on a table called cliente_planos. It generates controller methods using always $this->ClientePlanos, is generating correctly, but no control method…
-
0
votes1
answer363
viewsCakephp 3 - How to sum column values amount of multiple rows and display the result in the view?
I have the Table Entradaestoques id - Prod - Qtd 1 - soap - 10 2 - cloth - 7 3 - soap - 20 4 - disinfectant - 4 5 - soap - 20 6 - cloth - 3 I want to show in the View Soap: 50 units Cloth: 10 pieces…
-
0
votes2
answers128
viewsDifficulty accessing url with angular post
I’m passing a url and some data via angular post... However, the following warning appear on Chrome console: Cross origin requests are only supported for Protocol schemes: http, data, Chrome,…
-
0
votes1
answer145
viewsSet variable to template
I need to define a variable that will be displayed in the footer of all my pages, ie in the cake 3 template. Any ideas?
-
0
votes0
answers78
viewscakephp 3.3 links are receiving the "var/www/html" url
I’m having the following problem, in implementing the site all links that were generated by cakephp functions like: <?= $this->Html->image('logo.png', ['url'=>'/', 'id'=>'logo'])…
-
0
votes2
answers287
viewsHow to write data without Jquery mask using Cakephp3
I have a system in Cakephp 3.4.5 and am using jquery to apply a mask to the cep, Cpf, cnpj and etc. How do I save the data without the mask? I call Jquery in my default.ctp which is in my layout…
-
0
votes0
answers33
viewsCakephp 3 RSS error
I want to make an RSS generator, I followed the tutorial of the same in http://book.cakephp.org/3.0/en/views/helpers/rss.html. But things are not working as they should, because according to the…