# |
Dec 10th 2016, 21:42 |
savant |
and then get the count of that query |
# |
Dec 10th 2016, 21:42 |
savant |
you need to construct a query |
# |
Dec 10th 2016, 21:42 |
dragutux |
gives me an " Unknown finder method "count" " error |
# |
Dec 10th 2016, 21:41 |
dragutux |
$this->set('nb_posts', $this->Posts->find('count', array('conditions' => array('Post.visible' => 1, 'Post.draft' => 0)))); |
# |
Dec 10th 2016, 21:41 |
dragutux |
and there are some requests that leave me in WTF mode as i dont see how to transition that code to cake3 |
# |
Dec 10th 2016, 21:41 |
dragutux |
so i've attacked porting an old 2.0 app to cake 3 |
# |
Dec 10th 2016, 21:41 |
dragutux |
hello |
# |
Dec 10th 2016, 20:25 |
savant |
@pop sorry, went to bed, did you figure it out? |
# |
Dec 10th 2016, 20:04 |
GoAway |
styks1987, probably it's right way.Thanks for answer! |
# |
Dec 10th 2016, 20:03 |
styks1987 |
once it succeeds, then do your redirect |
# |
Dec 10th 2016, 20:03 |
styks1987 |
then* |
# |
Dec 10th 2016, 20:03 |
styks1987 |
Most people would validate and if it fails, the don’t redirect, they just reload the same page. |
# |
Dec 10th 2016, 20:02 |
styks1987 |
GoAway: you can either push the validation into the session via session write or send the validation errors as get params on redirect |
# |
Dec 10th 2016, 20:01 |
GoAway |
styks1987, yes but how? I see session already has errors var but it's emty.. |
# |
Dec 10th 2016, 20:00 |
styks1987 |
GoAway: You will have to find some way to send the validation errors in your redirect |
# |
Dec 10th 2016, 19:55 |
GoAway |
hey hey hey |
# |
Dec 10th 2016, 19:53 |
GoAway |
How to get validation errors to view if I return redirect? |
# |
Dec 10th 2016, 19:34 |
nathanpertuset |
Using cake 3, I installed a plugin using composer (php composer.phar require serhioromano/bootstrap-calendar — website: https://github.com/Serhioromano/bootstrap-calendar). Everything is installed to my vendor folder, but how can I include the CSS/JS files (which are currently in vendor/bootstrap-calendar/css/…) in my default template? |
# |
Dec 10th 2016, 17:16 |
styks1987 |
nvm I found it. I wasn’t passing my variable into the sub filtering function so it had not idea what $options meant in the query |
# |
Dec 10th 2016, 17:03 |
styks1987 |
but the actual query in cake doesn’t return anything |
# |
Dec 10th 2016, 17:03 |
styks1987 |
so ->sql() copied into the db gives me results |
# |
Dec 10th 2016, 17:03 |
styks1987 |
hmic: I have tried but the sql query returns results but the cake query does not |
# |
Dec 10th 2016, 16:37 |
hmic |
!tell styks1987 about TIAS |
# |
Dec 10th 2016, 16:18 |
styks1987 |
OR blue or round |
# |
Dec 10th 2016, 16:18 |
styks1987 |
so ->matching(Blue)->matching(Round) would return both blue and round |
# |
Dec 10th 2016, 16:17 |
styks1987 |
anyone here today? Does multiple calls to ->matching mean matching AND or matching OR? |
# |
Dec 10th 2016, 13:01 |
gaetansnl |
Hi, what do you use for complex authorization ? the acl plugin seems to be unfinished ? |
# |
Dec 10th 2016, 09:23 |
cakephp369 |
@ savant, thenks so much, it is uploading and working fine now, but I need some little modification |
# |
Dec 10th 2016, 08:59 |
savant |
in your bootstrap.php |
# |
Dec 10th 2016, 08:59 |
savant |
seems like you’re trying to load the plugin on heroku |
# |
Dec 10th 2016, 08:22 |
savant |
cool |
# |
Dec 10th 2016, 08:22 |
nicolastoto88 |
I did it |
# |
Dec 10th 2016, 08:22 |
nicolastoto88 |
thanks |
# |
Dec 10th 2016, 08:10 |
savant |
One very common task is to find the tree path from a particular node to the root of the tree |
# |
Dec 10th 2016, 08:10 |
savant |
on that page, look for the following text |
# |
Dec 10th 2016, 08:10 |
savant |
http://book.cakephp.org/3.0/en/orm/behaviors/tree.html |
# |
Dec 10th 2016, 08:10 |
savant |
you can use find path |
# |
Dec 10th 2016, 08:06 |
nicolastoto88 |
Hi, I am new with cakephp 3, I have one question about Tree Behavior, how i cant retrieve parent data (columns)? |
# |
Dec 10th 2016, 07:47 |
savant |
awesome looks good, try it in your app now |
# |
Dec 10th 2016, 07:46 |
cakephp654 |
https://github.com/josegonzalez/cakephp-upload/issues/422 |
# |
Dec 10th 2016, 07:45 |
savant |
link? |