Most voted "cakephp" questions
Cakephp is a framework written in PHP whose main objectives are to provide a framework that enables PHP programmers of all levels to develop robust applications quickly, without losing flexibility. Cake-PHP utilizes well-known software engineering concepts and design standards such as Activerecord, Association Data Mapping, Convention on Configuration, Front Controller and MVC (Model-View-Controller).
Learn more…376 questions
Sort by count of
-
26
votes2
answers5412
viewsWhat is Lazy Loading and Eager Loading?
What is Lazy Loading and Eager Loading? I saw these terms in a documentation, but I did not understand it very well, so my doubt is what these terms mean and I would like, if possible, to restrict…
php cakephp language-independent advance-charge lazy-loadasked 9 years, 5 months ago Ricardo 14,521 -
14
votes4
answers1700
viewsUnderstanding Node and Applications in Real-Time
Since I met the Cakephp I got used to programming with him, because I had a small learning curve and very fast development. For my recent application, I needed the data entered by users to be…
-
12
votes1
answer281
viewsCakephp actions not found in Wampserver Vhost
I am trying to make my administrator actions SSL-protected, including the login action. However, whenever I try to access one of these actions, I always get error 404. For example, when trying to…
-
9
votes2
answers1038
viewsHow to use databases in Cakephp without complying with naming conventions?
Cakephp has conventions for naming tables, classes, etc., such as having columns username and password for tables that save users. In my current situation, I have tables that do not obey these…
-
8
votes3
answers837
viewsDisable Auto Redirect after logging into Cakephp 2.4
I’m using Cakephp’s Auth 2.4 and if I try to access a link that needs login it redirects to the login form. For example: I try to access: /projects/Edit/34 without being logged in. Cakephp then…
-
7
votes2
answers4331
viewsHow to release a protected sub-directory with . htaccess?
I have a .htaccess in my test environment developed in Cakephp and . htaccess has authentication so that no one can access it. Now I need to release a site directory, actually a Cakephp plugin, I…
-
7
votes3
answers162
viewsUse . on() instead of . bind() in Cakephp’s Jshelper
When I write Ajax with Cakephp’s Jshelper, I write something like this $this->Js->get('#searchCity')->event( 'click', $this->Js->request( 'http://api.geonames.org/searchJSON', array(…
-
6
votes2
answers2560
viewsAccessing another controller’s variable - Cakephp
How do I access variables from another controller? For example: I have a controller X, and in action index, I create a variable (or a constant). Of controller Y, I want to access the value of the…
cakephpasked 10 years, 10 months ago morphinduction 473 -
6
votes1
answer1286
viewsOpen images on the same page with Fancybox in Cakephp impossible
I’m trying to make a gallery, which consists of a list of thumbnails, which by clicking on the items would eventually make a popup window appear as in first example here. After several failed…
-
6
votes1
answer621
viewsCakephp - page using more than one table
I have a question, about saving data in the database using Cakephp, when you need to manipulate with more than one table. I am creating a customer registration system and in it has a system to…
-
6
votes1
answer469
viewsHow to change this JSON object?
I’ve had the following problem for a few days: I’m using Cakephp and sending JSON to a datagrid of Easyui as follows: $rows = $this->Produto->find('all', array('fields' => array( 'id',…
-
6
votes0
answers1201
viewssynchronize Local database with Web
I’m developing an application in Cakephp, with a Mysql database. a part is already working but from the beginning I need a solution to the following problem: My application should work online, but…
-
5
votes4
answers264
viewsWhy does Cakephp set _method to PUT instead of POST?
I recently upgraded my Cakephp project to version 2.4.5. Since then, some of my forms have been with the input hidden _method set to PUT automatically. The only way around this is by setting the…
-
5
votes1
answer436
viewsProblem with ajax loading with Cakephp 2.x
My pages are uploaded via ajax and uploaded within div content. Where I take the url by the onclick event from the link, and then upload it. Calls made directly from the menu work normally, but when…
-
5
votes1
answer3525
viewsCakephp 3.0.1 error message
I have a problem installing the Cakephp, I’m using the Xampp, with PHP 5.5, and displays the message: Fatal error: You must enable the Intl Extension to use Cakephp. in C: Users inhome Desktop io…
-
5
votes1
answer1244
viewsUsing multiple databases
I don’t know much about databases, and I’ve never worked with large systems... I’m creating an application with Cakephp that will serve as a webservice for two distinct client types, one client is…
-
5
votes2
answers7863
viewsWhen should I use GET function and when should I use POST function?
I have a question and I think it’s quite "idiot" but when to use GET and when to use POST ? I know that when using GET the text or message written in a form or field, it is also passed to the link…
-
4
votes1
answer109
viewsIncorrect form method generated by Cakephp 2.4
My problem occurs with the following code: <?php echo $this->Form->create( 'Page', array( 'url' => array( 'controller' => 'pages', 'action' => 'delete',…
-
4
votes2
answers1644
viewsConfigure Cakephp to send emails via gmail
I’m trying to set up the cakephp to send emails through gmail, I have already done some research and I have not yet succeeded in the result, someone could help me?…
-
4
votes3
answers731
viewsProblem with function call in Cakephp
I have this in the Passage.php model: <?php class Passagem extends AppModel { public $name = 'Passagem'; }?> And this in Passagenscontroller.php: <?php class PassagensController extends…
-
4
votes1
answer281
viewsHow to make a Slug pagination in Cakephp?
Cakephp by default generates a pagination with indexes, for example: noticias/listar/page:2 I would like to make a pagination in this way: notícias/listar/2…
-
4
votes1
answer359
views -
4
votes1
answer1925
viewsCake PHP Relationship - 3 Tables
I have the following 3 tables: Table State: id nomeEstado Table City: id idEstado //(que busca da tabela estado) nomeCidade Participating Table: id Nome idCidade Now I want to put on the page Nome,…
-
4
votes1
answer81
viewsCombo does not display state name
Hello. Through Bake, I created a form to include a Municipality. However, Bake when generating the form, displays the status id and not its name. How do I get the name and not the State ID to appear…
-
4
votes2
answers201
viewsProcessing of data output from PHP database
In many cases we have data in the database that is not in the format we want them to be shown. As an example, let’s say I have a table called users and in this table a field called role which will…
-
4
votes1
answer237
viewsLimit to the strtotime function in php
I’m using the strtotime function as an example below, with cakephp. by spending the sum of 50 years is returning null, the most I can return is adding 20 years. Would anyone know if this is a…
-
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
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
answer365
viewsCakephp loses SESSION after a redirect
I’m doing an integration with Facebook Login. When the user clicks to log in using Facebook and accepts the application he is redirected to a method that creates a SESSION and redirects. The problem…
-
3
votes2
answers147
viewsHABTM problem in Cakephp 2.x
I’m having problems while searching my view method, where I have the following search: public function view($id = null) { if (!$this->Setor->exists($id)) { throw new…
-
3
votes2
answers451
viewsHow to avoid duplicate emails in the database?
I’m creating a simple CMS in Cakephp to learn how to use the framework. Within my CMS, in the administration part of the site, there is a tab that is called email and in this tab we see all the…
-
3
votes2
answers299
viewsDisplay data in the table
I am trying to present these items in this way: However after several attempts the table always remains so: How should I make the table to get this result? View <h2>Apagar evento</h2>…
-
3
votes1
answer79
viewsUsing the ACL in Cakephp
After doing a lot of research, I didn’t find a satisfactory answer. I’d like your feedback and/or advice on using the ACL in Cakephp. I’ve seen some plugins that "help" in this issue, but I haven’t…
-
3
votes0
answers76
viewsThe content Model appears in my index when using cakephp
Mine index.cpt and Layout.cpt are empty. But in the browser, my index appears with the contents of my Model: <?php class Post extends AppModel { public $validate = array('title' =>…
-
3
votes1
answer494
viewsPhpunit and Selenium - How to call specific functions of the test script?
I need to create several test scripts for WEB using Phpunit and Selenium. I was successful with my initial tests. I even managed to test the login and logout of my website effectively. The problem…
-
3
votes1
answer1567
viewsHorizontal scroll bar in the sublime text3, how to activate?
I use Sublime text 3 in my cakephp projects. By default the html files in cake have the extension . ctp and when I need to tinker with a file. ctp where I have a very large line of code it gives a…
-
3
votes1
answer433
viewsPagination always shows 20 images
I’m doing a gallery using Cakephp’s Pagination. The problem is that I only want to show 15 images per page, but regardless of the value I put in public $paginate, in the limit, 20 images are always…
-
3
votes2
answers449
viewsProblems with login CAKEPHP 2.6.1
I’m having trouble logging in to the Cakephp site, I’m following the example described on the site, but when you enter any user or password, even if you are not registered in the bank, it allows…
-
3
votes1
answer212
viewsCakephp constants are not recognized when accessing a webroot file
I was testing a simple upload system in my cakephp, so I referenced the img folder for these paths that the index.php of the root folder gives me. Only it was always giving error, saying that the…
-
3
votes1
answer231
viewsModal edit cakephp
I’m doing a CRUD all on my INDEX but I’m having trouble in the bootstrap modal parts. I made an EDIT button where it receives id but when I click it always brings the modal vázio. <a…
-
3
votes2
answers418
viewsCakephp Does Not Redirect on the Online Server
Good morning! I’m using the cakephp framework, but I’m having a problem with no solution so far... I have a login controller, commented all the login code and left only the tree $this->redirect(…
-
3
votes1
answer1829
viewsHide domain directory using htaccess or cakephp router
I am having trouble creating a setup on . htaccess to hide a folder from my site. My domain has the following structure: www.site.com.br/cake , where are the files and folders referring to the…
-
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
answer2007
viewsDatabase driver Cake Database Driver Mysql cannot be used due to a Missing PHP Extension
I’m having problems with Cakephp’s Bake, I’ve looked for solutions everywhere but none solved the problem. Error log: Exception: Database driver Cake\Database\Driver\Mysql cannot be used due to a…
-
3
votes1
answer138
viewsCRUD - send id of selected line to Toolbar - Cakephp
I’ve been hitting myself for a while with the following problem: I set up a CRUD on Cakephp, I did the grid with css to be cool and ready. The problem is that it is not at all elegant to have an…
-
3
votes2
answers1278
viewsSelect with Inner Join with Cakephp
I have a little problem for some time regarding a project that I am developing in cakephp, mine view can’t read a select with Inner Join table. Controller: public function initialize() { $posts =…
-
3
votes1
answer774
viewsUpload file with Cakephp
Regarding the upload file, I have the following codes so far: Controller: public function initialize() { parent::initialize(); $this - > loadComponent('Upload'); } public function upload() { if…
-
3
votes2
answers191
viewsDisplaying filter from another view
I have a View where customer data is shown, and at the click of a button, the user is redirected to a page that shows the moves of several customers, right on this page contains some filters. So…
-
2
votes2
answers388
viewsHow to remove table of results from a Cakephp find()?
I have 3 related tables: Usuario, Movimentacao and Grupo I’m using: $usuarios = $this->Usuario->find('all',array( 'recursive' => 1, 'fields' => "Usuario.id, Usuario.nome, Usuario.email"…
-
2
votes1
answer156
viewsCakephp via Shell returns error: class Helloshell could not be Loaded
I configured and installed everything with respect to Cakephp to use via command line in Ubuntu. I created and saved the following: class HelloShell extends AppShell { public function main() {…