# |
Jan 30th 2014, 08:08 |
jorgec |
anonymous0921: php statement |
# |
Jan 30th 2014, 08:06 |
headhoncho |
why not use regular php? |
# |
Jan 30th 2014, 08:06 |
anonymous0921 |
its used for a small loop so that a user cant edit or delete other users... |
# |
Jan 30th 2014, 08:05 |
anonymous0921 |
is <?php endforeach; ?> an old cake 1.3 statement, or can it still be used in cake 2.4 ? |
# |
Jan 30th 2014, 08:04 |
anonymous0921 |
i've pasted the file in http://bin.cakephp.org/view/198906874 |
# |
Jan 30th 2014, 08:04 |
anonymous0921 |
hey guys, my cake seems to have trouble with the following statement: <?php endforeach; ?> |
# |
Jan 30th 2014, 07:59 |
headhoncho |
very accurate |
# |
Jan 30th 2014, 07:59 |
headhoncho |
lmao arnis |
# |
Jan 30th 2014, 07:53 |
arnis |
vikky: btw, always start your question with error not "it's not working" otherwise it looks like this: https://pbs.twimg.com/media/BevU9cfCMAAr1ep.jpg |
# |
Jan 30th 2014, 07:51 |
vikky |
arnis: i am trying this code |
# |
Jan 30th 2014, 07:51 |
vikky |
yeah |
# |
Jan 30th 2014, 07:51 |
arnis |
vikky: did ya got it? |
# |
Jan 30th 2014, 07:51 |
arnis |
anyways, if fetching only one field, maybe a better way to use $this->Model->field('name') |
# |
Jan 30th 2014, 07:50 |
arnis |
wellm, he got the idea, I hope. |
# |
Jan 30th 2014, 07:50 |
jorgec |
arnis: username |
# |
Jan 30th 2014, 07:49 |
arnis |
so you must use $user['User']['id'] for example |
# |
Jan 30th 2014, 07:49 |
arnis |
$this->User->find('first',array('fields'=>'username')), <- this returns an array |
# |
Jan 30th 2014, 07:49 |
arnis |
vikky: you are echoing array |
# |
Jan 30th 2014, 07:48 |
jorgec |
vikky: use debug |
# |
Jan 30th 2014, 07:48 |
arnis |
also, first check if you model methods return any data |
# |
Jan 30th 2014, 07:48 |
vikky |
my error is this Array to string conversion [APP/View/Emails/html/new_lead.ctp, line 7] Array |
# |
Jan 30th 2014, 07:47 |
arnis |
vikky: try to seperate lines, $Email->viewVars(array('foo' => 'bar')); |
# |
Jan 30th 2014, 07:45 |
vikky |
Plz help |
# |
Jan 30th 2014, 07:45 |
vikky |
i am not able to get viewVars in my Mails http://bin.cakephp.org/view/164479383 |
# |
Jan 30th 2014, 07:44 |
arnis |
use auth component. |
# |
Jan 30th 2014, 07:44 |
aro |
is there a way to find out why a page is blackholed? |
# |
Jan 30th 2014, 07:42 |
raviK |
how to get index.html which is a landing page first without password authentication only for this page else all other pages needs password to be asked in CakePHP |
# |
Jan 30th 2014, 07:37 |
arnis |
morning |
# |
Jan 30th 2014, 06:52 |
todds |
welp, scratch thatâ?¦still (without any idea of the features in the 1.3 branch) debug kit is a big time saver. |
# |
Jan 30th 2014, 06:52 |
voycey |
but just try doing pr($this->request) in your controller for now |
# |
Jan 30th 2014, 06:52 |
Starcraftmazter |
oooook |
# |
Jan 30th 2014, 06:51 |
voycey |
You dont have to - it only works when its Debug 2 |
# |
Jan 30th 2014, 06:51 |
todds |
SO VERY MUCH WORTH IT |
# |
Jan 30th 2014, 06:51 |
Starcraftmazter |
>< |
# |
Jan 30th 2014, 06:51 |
Starcraftmazter |
and hen i have to git except all those files |
# |
Jan 30th 2014, 06:51 |
Starcraftmazter |
still too much effort |
# |
Jan 30th 2014, 06:50 |
todds |
https://github.com/cakephp/debug_kit#versions |
# |
Jan 30th 2014, 06:50 |
Starcraftmazter |
link |
# |
Jan 30th 2014, 06:50 |
todds |
nup, i believe there is a 1.3 branch |
# |
Jan 30th 2014, 06:50 |
Starcraftmazter |
todds: it requires cake 2 |
# |
Jan 30th 2014, 06:49 |
todds |
starcraftmazter: Do it. It will change your life. |