# |
Jul 5th 2017, 11:52 |
neon1024 |
I thought it might be this, https://ecosystem.atlassian.net/browse/ACJIRA-1015 |
# |
Jul 5th 2017, 11:52 |
neon1024 |
The response from `\Cake\Http\Client::post` |
# |
Jul 5th 2017, 11:51 |
cleptric |
Wait, request or response? |
# |
Jul 5th 2017, 11:51 |
neon1024 |
Hm, okay, thanks @cleptric I guess the response is actually empty then! |
# |
Jul 5th 2017, 11:50 |
cleptric |
@neon1024 yep |
# |
Jul 5th 2017, 11:50 |
ldsign |
Hi. Do you know, how to use a custom helper in a core-viewclass? E.g. use ExtendedHtmlHelper in JsonView? |
# |
Jul 5th 2017, 11:50 |
neon1024 |
`$response->getBody()->getContents()` ? |
# |
Jul 5th 2017, 11:49 |
neon1024 |
When I try and see the content of an api request which is giving me a 400, I get steam php memory. How do I see the body content? |
# |
Jul 5th 2017, 11:46 |
juststeveking |
I know x) having one of those days |
# |
Jul 5th 2017, 11:45 |
cleptric |
No problem at all :slightly_smiling_face: Casting objects is more PHP then CakePHP ^^ |
# |
Jul 5th 2017, 11:45 |
juststeveking |
I figured it out from other code in the model |
# |
Jul 5th 2017, 11:45 |
juststeveking |
Sorry guys, relatively new to cake |
# |
Jul 5th 2017, 11:44 |
neon1024 |
gg PHP |
# |
Jul 5th 2017, 11:44 |
neon1024 |
Ah yes, it seems you can! https://3v4l.org/9TjST |
# |
Jul 5th 2017, 11:43 |
neon1024 |
I wonder what would happen |
# |
Jul 5th 2017, 11:43 |
neon1024 |
Can you cast a class to array? |
# |
Jul 5th 2017, 11:43 |
cleptric |
`$this` should be the Table when you’re calling your mail stuff in afterSave |
# |
Jul 5th 2017, 11:41 |
juststeveking |
Can I cast $this to an array to pass through to my email? |
# |
Jul 5th 2017, 11:40 |
juststeveking |
:slightly_smiling_face: thanks dde |
# |
Jul 5th 2017, 11:40 |
juststeveking |
`->viewVars()` |
# |
Jul 5th 2017, 11:36 |
cleptric |
don‘t remember the exact name right now ,:) |
# |
Jul 5th 2017, 11:36 |
cleptric |
And also something for the view vars |
# |
Jul 5th 2017, 11:35 |
cleptric |
There is a setTemplate method |
# |
Jul 5th 2017, 11:35 |
juststeveking |
I know, I have added it, but wasn't sure how to send through a rendered template with variables |
# |
Jul 5th 2017, 11:35 |
cleptric |
The Email class is available everywhere |
# |
Jul 5th 2017, 11:35 |
juststeveking |
I am used to swiftmailer |
# |
Jul 5th 2017, 11:34 |
juststeveking |
So how do I best pass through an email view to the CakeEmail class? |
# |
Jul 5th 2017, 11:34 |
juststeveking |
Ah ok :slightly_smiling_face: |
# |
Jul 5th 2017, 11:34 |
cleptric |
Components are tied to the Controller layer |
# |
Jul 5th 2017, 11:33 |
juststeveking |
But the people who built the application made a communication component |
# |
Jul 5th 2017, 11:33 |
juststeveking |
On my afterSave method I want to send an email :slightly_smiling_face: |
# |
Jul 5th 2017, 11:33 |
cleptric |
No, this doesn’t make sense though. Want do you want to do? |
# |
Jul 5th 2017, 11:32 |
juststeveking |
Is there a way I can add components to a model at all? |
# |
Jul 5th 2017, 11:16 |
chris-andre |
@neon1024 Date and time is and has always been my worst nightmare :P |
# |
Jul 5th 2017, 11:12 |
unclezoot |
?redirect= only appears if i try to access a simple one word page e.g. /myaccount, but try logging into a page with parameters. e.g. /resources/assets/view/1 and ?redirect= has completely disappeared |
# |
Jul 5th 2017, 11:09 |
juststeveking |
@savant thanks for that! I think it may be a little worthless adding this in on a dispatch filter, as the speed will be no different in adding to my audit table than it is adding to a queue table |
# |
Jul 5th 2017, 11:06 |
unclezoot |
hmm, ?redirect= doesnt always appear when you get the 'you are not authorized to access that location' message? |
# |
Jul 5th 2017, 11:03 |
unclezoot |
i dont have any redirects configured in my Auth component, but i can see the query string now im killing my code in the right place. will just redirect to that. thanks neon! |
# |
Jul 5th 2017, 11:01 |
unclezoot |
yes i see the qs, but couldnt see where it went after logging in |
# |
Jul 5th 2017, 10:59 |
neon1024 |
You should even notice that when you are on the login url, that there is a query string which contains the previous url |
# |
Jul 5th 2017, 10:58 |
neon1024 |
https://book.cakephp.org/3.0/en/controllers/components/authentication.html#redirecting-users-after-login |