# |
Jul 6th 2018, 09:14 |
josbeir |
there you go :slightly_smiling_face: |
# |
Jul 6th 2018, 09:14 |
neon1024 |
`->where(['reset_token_created <=' => strtotime('-1 hour')])` |
# |
Jul 6th 2018, 09:14 |
josbeir |
? |
# |
Jul 6th 2018, 09:14 |
josbeir |
< DATE_SUB(NOW(),INTERVAL 1 HOUR) |
# |
Jul 6th 2018, 09:13 |
lorenzo |
@k4t is there a reason you need to do that? |
# |
Jul 6th 2018, 09:13 |
neon1024 |
Sorry for a stupid question, but my brain is rebelling. I want to see if a `datetime` mysql column is not older than 1 hour. |
# |
Jul 6th 2018, 09:13 |
k4t |
Hi I am filtering collection of object using ->filter method. How I can break the iteration under certain condition in filter function callback? |
# |
Jul 6th 2018, 09:12 |
josbeir |
most obfuscation techniques are easily unobfuscated |
# |
Jul 6th 2018, 09:12 |
josbeir |
i would also think twice in doing it, ask yourself what the purpose is and why you want to do it |
# |
Jul 6th 2018, 09:11 |
a.didier |
ok thx |
# |
Jul 6th 2018, 09:11 |
josbeir |
@a.didier probably is but nothing to do with cake itself |
# |
Jul 6th 2018, 09:10 |
a.didier |
hello, is it possible to obfuscate a cake project ? |
# |
Jul 6th 2018, 09:10 |
josbeir |
probably something like that |
# |
Jul 6th 2018, 09:09 |
josbeir |
return $this->response->withStringBody($blob)>withType('pdf') |
# |
Jul 6th 2018, 09:09 |
josbeir |
:P |
# |
Jul 6th 2018, 09:09 |
josbeir |
or what lorenzo sez |
# |
Jul 6th 2018, 09:09 |
lorenzo |
that’s pretty much what you need to do |
# |
Jul 6th 2018, 09:09 |
josbeir |
just echt the blob and respond with pdf as ctype |
# |
Jul 6th 2018, 09:09 |
lorenzo |
the response class has methods to stream a file |
# |
Jul 6th 2018, 09:08 |
portilloster |
@josbeir what I basically need to do is, first save the PDF as a blob in the database. Then, once stored, I want to read the blob and display the pdf file in a iframe in the view. |
# |
Jul 6th 2018, 08:54 |
josbeir |
in your controller action this should work `return $this->response->withFile('file.pdf');` |
# |
Jul 6th 2018, 08:51 |
josbeir |
@portilloster you mean just serve an existing pdf, not a generated one? |
# |
Jul 6th 2018, 08:44 |
josbeir |
* @throws \Cake\Mailer\Exception\MissingActionException * @throws \BadMethodCallException |
# |
Jul 6th 2018, 08:44 |
josbeir |
i think checking the return value as the exceptions throw by Mailer::send() do not directly relate to success/failure it seems |
# |
Jul 6th 2018, 08:43 |
josbeir |
you main to check for success/failure? |
# |
Jul 6th 2018, 08:20 |
neon1024 |
What is a good technique for knowing if you’ve sent an email? Just check the array return from `send()` or wrap in `try() catch {}` ? |
# |
Jul 6th 2018, 07:46 |
portilloster |
https://github.com/FriendsOfCake/CakePdf |
# |
Jul 6th 2018, 07:46 |
portilloster |
I found this information from @dereuromark but I believe is to turn part of your html code in PDF |
# |
Jul 6th 2018, 07:44 |
portilloster |
Does anyone knows how can I save a PDF as a blob and render it in a view? |
# |
Jul 6th 2018, 07:44 |
portilloster |
Morning all!! |
# |
Jul 6th 2018, 07:40 |
neon1024 |
Morning all |
# |
Jul 6th 2018, 00:00 |
chris-andre |
With that approach I get id of checked "item", and can use those ids in a condition to update status. Or is it a better approach? |
# |
Jul 5th 2018, 23:59 |
chris-andre |
Is this the best approach to get id's from a form where checked rows shall be updated? `Hash::extract(Hash::extract($this->request->getData(), '{n}[id!=0]'), '{n}.id')` |
# |
Jul 5th 2018, 23:28 |
rightscoreanalysis |
it seems to continue with the rest of the method |
# |
Jul 5th 2018, 23:28 |
rightscoreanalysis |
will my controller return at this point |
# |
Jul 5th 2018, 23:28 |
rightscoreanalysis |
if($foo){ $this->set('_serialize', ['reply']); $this->set(compact('reply')); } |
# |
Jul 5th 2018, 23:28 |
rightscoreanalysis |
if i have json routing enabled and I do this: |
# |
Jul 5th 2018, 22:44 |
chris-andre |
Thinking how to update checked records with a status or delete them. |
# |
Jul 5th 2018, 22:43 |
chris-andre |
Hi. What do you think of this approach, see line 25 and 71: https://gist.github.com/chris-andre/69232e61c2f56ca8a9c62459467e1bf6 |
# |
Jul 5th 2018, 21:30 |
bravo-kernel |
Not saying it can't be done btw, I have often wondered how these folks do it. https://jsonapi-suite.github.io/jsonapi_suite/how-to-autodocument |
# |
Jul 5th 2018, 21:26 |
bravo-kernel |
Hope this is clear. If you have annotations to share I would appreciate it. :thumbsup: |