Tenho 2 models (cautela E acesso) e 1 controller (cautela).
Como informar ao controller aqueles models?
A ideia é a seguinte:
Model 'acesso': funções de login (vai pra cautela) e de logout (sai de
cautela);
Model 'cautela': toda a funcionalidade do sistema necessário (esta parte tá
ok)!!!
You can use $uses property of your controller to use multiple models or
ClassRegistry::init() method to load your model where you use it.
class YourController extends AppController {
public $uses = array('Model1', 'Model2');
}
or
public function one() {
$results1 =
You can allow unauthorized access to action if your action is requested
with requestAction method.
For example:
public function beforeFilter() {
parent::beforeFilter();
if ($this-request-is('requested') $this-request-params['action']
== 'index') {
Hi,
I am a student who is participating GSOC 2013. I am doing project with
cakephp. I want to save two models in same controller but I am stucked in
the middle of that. Could you please help me to solve that problem.
I have two tables
1. Task- id, name, description, cost
2. Connect- id,
I am new in CakePHP, trying to make an application. In this application, I
have a navigation bar, whose Menus I want to be changed according to login
status of a user. I think I can't explain clearly, please have a look at
this code snippet :
This is my header part's(an element) navigation
Hi everybody,
I'm struggling with a particular hasAndBelongsToMany form data problem and
need some help.
Quickly:
1. A recipe can have many ingredients.
2. An ingredient can be in many recipes.
2. An ingredient in a recipe can be mandatory or optional (or not present).
4. an ingredient in a
My CakePHP error.log (/app/tmp/logs/error.log is full of errors (well,
Favicon.ico)
2013-06-24 11:12:54 Error: [MissingControllerException] Controller class
Favicon.icoController could not be found.
Exception Attributes: array (
'class' = 'Favicon.icoController',
'plugin' = NULL,
)
I am using Cakephp 1.3 and having a lot of troubles with session timeouts.
So, here's my core.php file.
Configure::write('Session.save', 'cake');
Configure::write('Session.cookie', 'TESTING');
Configure::write('Session.timeout', '0.01');
Configure::write('Session.start', true);
Hi, I need to test what happens on my page when the session is gone.
for that test I have changed some values on my core.php.
session.timeout = 1
security.level = low
Session Lifetime = 1 * 300 = 300 seconds (5 minutes)
then a guy showed me that the calc for cookie lifetime is diferent,
I am using Cakephp 1.3 and having a lot of troubles with session timeouts.
So, here's my core.php file.
Configure::write('Session.save', 'cake');
Configure::write('Session.cookie', 'TESTING');
Configure::write('Session.timeout', '0.01');
Configure::write('Session.start', true);
On Monday, 24 June 2013 20:26:49 UTC+2, 라이더제이슨 wrote:
My CakePHP error.log (/app/tmp/logs/error.log is full of errors (well,
Favicon.ico)
2013-06-24 11:12:54 Error: [MissingControllerException] Controller class
Favicon.icoController could not be found.
Exception Attributes: array (
As many have failed before me, I am trying to massage some data in the
afterFind callback in CakePHP 2.3.6.
public function afterFind($results, $primary = false) {
$results = parent::afterFind($results, $primary);
foreach ($results as $key = $val) {
//... do stuff
Try to upgrade to Ubuntu 12.10.
The version of PHP is the problem.
Em domingo, 5 de maio de 2013 05h29min50s UTC-3, CrotchFrog escreveu:
I've been running Cake on Ubuntu Server 12.04 for quite some time now and
never a problem. I don't necessarily have a problem with CakePHP itself,
but
13 matches
Mail list logo