# |
Jul 10th 2017, 19:34 |
siran |
running phpunit I have a failing 'testMultipleGet' in a PagesControllerTest... has someone any idea why this is happening? |
# |
Jul 10th 2017, 19:34 |
theskillwithin |
json_encode |
# |
Jul 10th 2017, 19:34 |
cleptric |
Hi :slightly_smiling_face: |
# |
Jul 10th 2017, 19:33 |
siran |
hi all |
# |
Jul 10th 2017, 19:21 |
jarard01 |
should I set this: $this->autoRender = false; |
# |
Jul 10th 2017, 19:19 |
jarard01 |
but I cannot see the data in my reply |
# |
Jul 10th 2017, 19:19 |
jarard01 |
$this->set('_serialize', ['reply']); |
# |
Jul 10th 2017, 19:19 |
jarard01 |
I have the request handler set then a the bottom of my method: $this->set('reply', $reply); |
# |
Jul 10th 2017, 19:18 |
jarard01 |
I am unable to return json form my controller |
# |
Jul 10th 2017, 19:05 |
jarard01 |
how can i return json in my method? |
# |
Jul 10th 2017, 17:58 |
pedroseco |
I think the equivalent of what I’m trying to do would be a afterFind (if wI was on Cake2) |
# |
Jul 10th 2017, 17:56 |
chris-andre |
@pedroseco You could use beforeFind() or create a custom finder |
# |
Jul 10th 2017, 17:52 |
pedroseco |
If I want to filter a model queries, independent of the method in controller, what should I use? A behavior? |
# |
Jul 10th 2017, 17:51 |
pedroseco |
Hi guys. |
# |
Jul 10th 2017, 17:39 |
admad |
Brian___: yes |
# |
Jul 10th 2017, 17:34 |
ericadeefox |
@Brian___: "It is not required to define email configuration in config/app.php. Email can be used without it and use the respective methods to set all configurations separately or load an array of configs." from https://book.cakephp.org/3.0/en/core-libraries/email.html |
# |
Jul 10th 2017, 17:25 |
Brian___ |
hi I'm new to cake and I inherited a project with an empty EmailConfig class--only the 'from' address is in there. Does cake just default to using PHP's builtin mail setup if no configuration is given? |
# |
Jul 10th 2017, 17:22 |
steinkel |
@neon1024 https://www.twilio.com/sms never used their sms API though |
# |
Jul 10th 2017, 17:16 |
chrisShick |
or would I use a callback for something like this? |
# |
Jul 10th 2017, 17:06 |
chrisShick |
Is there a way to map parameters to a resource? such as a deleteBy/:user_id |
# |
Jul 10th 2017, 16:48 |
ericadeefox |
neither `loginRedirect` nor `redirectUrl` are set. in controller we've got 'return $this->redirect($this->Auth->redirectUrl());' which is not set and just redirects the user to '/' |
# |
Jul 10th 2017, 16:45 |
chrisShick |
But I don't think that works |
# |
Jul 10th 2017, 16:45 |
chrisShick |
such as $routes->resources('Articles', [ 'map' => [ 'deleteBy/:user_id' => [ 'action' => 'deleteBy', 'method'=>'POST']]]); |
# |
Jul 10th 2017, 16:41 |
chrisShick |
Greetings friends! I am curious about adding a parameter to an action in the resources map option |
# |
Jul 10th 2017, 16:06 |
neon1024 |
Ooh, I was half right! ;) |
# |
Jul 10th 2017, 16:06 |
neon1024 |
Ah `redirectUrl` even, I always get those confused |
# |
Jul 10th 2017, 16:06 |
neon1024 |
https://book.cakephp.org/3.0/en/controllers/components/authentication.html#redirecting-users-after-login |
# |
Jul 10th 2017, 16:05 |
neon1024 |
I’d bet a cup of tea that the `loginRedirect` setting is set |
# |
Jul 10th 2017, 16:05 |
neon1024 |
Sounds like a configuration issue with the AuthComponent to me |
# |
Jul 10th 2017, 15:44 |
ericadeefox |
hey y'all, having basically this same problem: https://stackoverflow.com/questions/44257598/login-redirecting-in-cakephp-3-4 specifically: Now everything working fine but getting null query parameter string even though passing query parameter string like this `login?redirect=%2Farticles%2Fadd`. therefore, upon logging in, it just redirects to '/' rather than the string after redirect=. no query or session data from the redirect url. |
# |
Jul 10th 2017, 15:36 |
sturm |
Ah, that was it. I put the file in the project root, not in the /webroot folder. Thank you, @admad! |
# |
Jul 10th 2017, 15:35 |
admad |
The access yourapp/phpinfo.php |
# |
Jul 10th 2017, 15:35 |
admad |
@sturm Make webroot/phpinfo.php and put the statement in that |
# |
Jul 10th 2017, 15:33 |
sturm |
I apologize for another newbie question: How do I get a simple phpinfo(); with CakePHP? All I get is a “Missing Controller” error page. |
# |
Jul 10th 2017, 14:44 |
anvyst |
@neon1024 clickatell? (https://github.com/arcturial/clickatell) |
# |
Jul 10th 2017, 14:40 |
neon1024 |
Anyone have any service suggestions for me to send SMS messages with please? |
# |
Jul 10th 2017, 14:10 |
lorenzo |
:) |
# |
Jul 10th 2017, 14:08 |
birdy247 |
Thanks for the help |
# |
Jul 10th 2017, 14:07 |
birdy247 |
it was still using the array! |
# |
Jul 10th 2017, 14:07 |
birdy247 |
I hadnt update the config file in my app |
# |
Jul 10th 2017, 14:07 |
birdy247 |
ahhh |