Grokbase Groups PHP cake-php May 2012
FAQ
In my Payment model I have the following

var $payMethodAll = array(
'0' => 'Cash On Arrival',
'1' => 'Direct Debit',
'2' => 'Post (Cheque Only)',
'3' => 'Credit Card',
'4' => 'Account Credit',
'5' => 'Account Credit + Direct Debit'

);

In my Bookings controller, I call this data:

$pMethods = $this->Payment->payMethodAll;

And I get the following error:

Notice (8): Undefined property: AppModel::$payMethodAll [APP
\controllers\bookings_controller.php, line 180]

This was working perfectly before but now all of a sudden is not.

I have tried clearing my tmp/cache/models

Im confused as to what the problem is, because in the
bookings_controller I can use the model to get data from the database
without issue: ie:

$p = $this->Payment->find('all');

works perfectly

Any ideas?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Search Discussions

  • Stork at May 24, 2012 at 7:55 pm
    Cake creates instance of AppModel if it can not find proper model (default
    by controller name or enlisted in $uses), it is obviously caused by wrong
    filename.

    --
    Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
    Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


    To unsubscribe from this group, send email to
    cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
  • Sanfly at May 24, 2012 at 9:00 pm
    But I'm able to access the same model using

    $p = $this->Payment->find('all');

    in the same document...
    On May 25, 7:55 am, stork wrote:
    Cake creates instance of AppModel if it can not find proper model (default
    by controller name or enlisted in $uses), it is obviously caused by wrong
    filename.
    --
    Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
    Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


    To unsubscribe from this group, send email to
    cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
  • Stork at May 24, 2012 at 9:19 pm
    Sure, it is instance of AppModel using table payments.

    --
    Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
    Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


    To unsubscribe from this group, send email to
    cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcake-php @
categoriesphp
postedMay 24, '12 at 6:52p
activeMay 24, '12 at 9:19p
posts4
users2
websitecakephp.org
irc#cakephp

2 users in discussion

Sanfly: 2 posts Stork: 2 posts

People

Translate

site design / logo © 2022 Grokbase