CakePHP How to change the X-Mailer
Basically, on your CakeEmail object: If set manually Cake will not add his default value 'CakePHP Email'. Source: http://stackoverflow.com/a/18032036
Basically, on your CakeEmail object: If set manually Cake will not add his default value 'CakePHP Email'. Source: http://stackoverflow.com/a/18032036
The default hash type of Cakephp 2.0 is sha1. But when you have set a Security.Salt in the core.php this will be added before your password and before the encryption…
This CakePHP example will show you how to merge your Add and Edit forms into a Single Form action.
This may be of benefit if you have a form with complex controller logic that you don’t want to duplicate.
(more…)
Let’s say you have an application, where users can place votes for their favorite products and you’d like to increment the current number of votes by one or count number…
To retrieve data from another model into view templates or anyplace Or if the models are associated, just daisy chain the finds:
How to define a global variable in CakePHP which i can use anywhere in the application. Solution: You can write a new config value or you can define a variable…
In this tutorial, i will show you how to implement jQuery UI’s autocomplete widget in cakephp. The script in this tutorial is copy paste from tutorialzine article “A Simple Movie Search App w/ jQuery UI” . We are using a MySql database containing a users table. When you start typing a user name in the text box of the search form, an AJAX request is sent to controller. The controller returns a JSON object with suitable user name.
This is what we’re going to create:
(more…)
There is some tweaking that we need to perform in order to make sure that Apache runs CakePHP applications smoothly. Many Apache installations may not require the following tweaking, as they might be set as default, but it is always a good idea to check if the following settings are present.
(more…)
The MVC (Model View Controller) pattern is a commonly used design pattern in software development, where the code is separated into three major parts: models, views, and controllers. The exact purpose of each part depends on the implementation, as it may vary from one framework to another. Here, we are going to describe the way CakePHP implements the MVC pattern. So, this is not a general discussion on MVC pattern, rather we are only going to see Cake’s own MVC implementation. As we have already mentioned, CakePHP separates the code into three separate parts: models, views, and controllers.
(more…)
According to the official CakePHP website (http://cakephp.org):
“Cake is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.”
Someone who is new to frameworks might not understand parts of the definition. But understanding a few key terms will make the job much easier.
(more…)