All Questions

RSS

6 answers

2 votes

Asked by trevorsg, on 30/10/09 in Models

What do you think of my Validation tool?

I got frustrated with long complicated validation rules in my models, and the limited functionality of Bake's validation generation, so I made my own tool. If I get enough support I will clean it up, make it pretty, and probably get it its own...

5 answers

0 votes

Asked by jepster, on 23/2/10 in Models

Fatal error: Class 'DATABASE_CONFIG' not found

Hi,

I've downloaded cake 1.2.6, installed it and then I've started baking. but then the database configuration cannot be configured. I had this problem a few times. at the end cames always the message

Fatal error: Class 'DATABASE_CONFIG' not found...

4 answers

0 votes

Asked by andrea, on 27/1/10 in Models

Get user id inside a model

I'm moving some of my find code inside models.

Previously in my controller I had


$this->Book->Review->find('first', array(
	'conditions' => array(
		'Review.book_id' => $id,
		'Review.user_id' => $this->Auth->user('id')
	)
));

so in my Review...

4 answers

0 votes

Asked by dimis283, on 4/2/10 in Models

find if data is new (and not for update)

How can I find if the data inserted for a model is a new record and not an updated record?

I want something like that


function beforesave()
{
if (isnew)
$this->data[model][field]=$some
}

4 answers

0 votes

Asked by pjb, on 11/2/10 in Behaviors

setFlash not working

Hi, I'm having a problem with the setFlash. I have this piece of code included in my layout...


<?php
if ($session->check('Message.flash')) {
    $session->flash();
  }
?>

However none of my messages are showing up, any ideas?

4 answers

0 votes

Asked by stdcinout, on 24/3/10 in Components

how to create simple admin panel in cakephp

hello guys i have been trying to create a simple admin panel without acl

just auth and cake admin router..

been trying to google and find the solution however none really supports what i want

something like /login and admin/products/add for basic...

4 answers

0 votes

Asked by nutbutter, on 2/8/10 in Controllers

Blank Page on Login

I'm not sure if this is a validation issue, redirect, or something else. If a user enters the wrong login data, then he/she is taken to a blank white page with no output regardless of debug level. I've been beating my head against the wall and...

4 answers

0 votes

Asked by dalcacio2007, 3 weeks, 4 days ago in Components

Sessions Not Working

I just started using cakephp 1.3 for my latest application; however sessions don't seem to be working.

example:


$this->Session->write('myvar','abcdefghijklmnopqrstuvwxyz');
$myvar = $this->Session->read('myvar');

after executing this code $myvar...

3 answers

0 votes

Asked by phpcurious, on 30/10/09 in Installation / Configuration

How do you configure a cake app to run in a Subdir?

I just created a new cake app in a subdir in our company's web server.

My problem is I don't know how to configure the web app to run on a Subdir.

Can you please tell me how to do it?

3 answers

0 votes

Asked by Lemon, on 1/11/09 in Behaviors
<< previous 1   2   3   4   5   6   7   8   9

How does CakePHP Questions work?

CakePHP Questions is easy to use: Register and login or directly login using OpenID and just ask your question!

After you ask your question you just need to wait until you have got some answers and pick the correct answer.

Other users might help you by finding the right answer by voting and giving comments.