eberfreitas
Questions Asked
1 answer
Managing big applications
Hey guys!
I have an application here that is growing bigger and bigger. The address is this:
Answers
1
__('Translation for validation messages') ?
Here is a cool way to do it. On your app_model, do something like this:
class AppModel extends Model {
public $validate = array();
public function __construct($id = false, $table = null,... 0
How to pass data to all views
You could define those things on your app_controller beforeFilter method and set the $logged variable right there so you can access it from the layout itself and not each view.
The same goes for...
0
Extra space after ?>
In fact, files with PHP only I don't even close it with "?>".
I just omit it. It won't do any harm.
Comments
- Member since:
- November 23rd, 2009
- Last active:
- 2009-11-23 23:26:31
- Questions asked:
- 1
- Answers:
- 11
- Correct Answers:
- 3
- Comments:
- 2
Dynamic homepage
Why no just use redirects?Translate Behavior and belongsTo
For instance, I have a project with a table Sale and a table Msg. Sale hasMany Msg and Msg belongsTo Sale. Every message is encrypted but it's made via behaviour. When I query a Sale, I do something like: $sale =...