# |
Dec 20th 2017, 14:27 |
admad |
it's 3 lines of code to get the list of tables from db |
# |
Dec 20th 2017, 14:26 |
vignesh.pattalam |
oh ok, I'll take a closer look then thank you :slightly_smiling_face: |
# |
Dec 20th 2017, 14:26 |
admad |
instead of having to do the typing |
# |
Dec 20th 2017, 14:26 |
admad |
those are core methods, i just showed you how to use them |
# |
Dec 20th 2017, 14:25 |
vignesh.pattalam |
@admad Thank you for that link! So does this mean there is no method in Core CakePHP to find if a table exists in the database ? Is there any plans to bring it to the core or is crud-view going to be the solution for this ? |
# |
Dec 20th 2017, 14:25 |
jotpe |
The file isn't existing, should be created from data on the fly |
# |
Dec 20th 2017, 14:25 |
k4t |
Here you can also see how I am calling that XYZ action from cURL: https://gist.github.com/K4T/13b01c3d2c572394a390174e6db5697d |
# |
Dec 20th 2017, 14:24 |
admad |
https://api.cakephp.org/3.5/class-Cake.Http.Response.html#_withFile |
# |
Dec 20th 2017, 14:23 |
jotpe |
@admad, not sure, but withStringBody does not output the content of the file: https://pastebin.com/5uds03gm |
# |
Dec 20th 2017, 14:20 |
k4t |
the problem is only when I am calling that XYZ action from cURL from another PHP script |
# |
Dec 20th 2017, 14:19 |
k4t |
I can also manually call XYZ action directly from the browser - everything is ok in that situation |
# |
Dec 20th 2017, 14:18 |
k4t |
I also checked received cookies from cURL request in XYZ action and I can see that session cookie was sent, but still user session is not visible |
# |
Dec 20th 2017, 14:17 |
slackebot3 |
request which are taken from $_SERVER['HTTP_COOKIE']). I can not find why it is not working. Did I miss something? |
# |
Dec 20th 2017, 14:17 |
k4t |
I have simple action XYZ in Cake which returns json: { hasAccess: true/false } (depends on whether the user is logged in and has access to resource or not). That XYZ action is called by cURL request invoked from another simple PHP script which is located on the same server under the same domain. My problem is that when I call that XYZ action via that cURL than user session is not visible in XYZ action (I am sending all cookies with that cURL |
# |
Dec 20th 2017, 14:14 |
jotpe |
perfect @admad :slightly_smiling_face: |
# |
Dec 20th 2017, 14:13 |
admad |
@jotpe ->withStringBody() |
# |
Dec 20th 2017, 14:12 |
admad |
@vignesh.pattalam https://github.com/FriendsOfCake/crud-view/blob/master/src/View/Cell/TablesListCell.php#L23 |
# |
Dec 20th 2017, 14:10 |
jotpe |
hey guys. I want to use $this->response->body(); but it's deprecated and withBody() should be used, which wants a StreamInterface as param. Do i need to implement the StreamInterface in a Class? Is there maybe a implementation yet? |
# |
Dec 20th 2017, 14:08 |
k4t |
hello |
# |
Dec 20th 2017, 14:06 |
vignesh.pattalam |
Hi, I have a question. Is there any method in CakePHP that tells you if a table exists in the database ? I initially thought TableRegistry::exists() did this, but it doesn't look it that is its functionality |
# |
Dec 20th 2017, 14:06 |
neon1024 |
Fair enough, just be mindfull of adding extra dependencies when you don’t need to |
# |
Dec 20th 2017, 14:05 |
obinoob |
neon1024 i guess it's all the same the plugin is just easing my instalation troubles |
# |
Dec 20th 2017, 14:03 |
saeideng |
no need to any plugin |
# |
Dec 20th 2017, 14:02 |
saeideng |
just `CKEDITOR.replace( 'textarea1',{fullPage : false});` |
# |
Dec 20th 2017, 14:01 |
neon1024 |
Just used the jQuery adapter |
# |
Dec 20th 2017, 14:01 |
neon1024 |
Never needed a helper for CK Editor personally |
# |
Dec 20th 2017, 14:01 |
obinoob |
whats the proper way of displaying ckeditor data, all I can get is html which I think is fine but I need to render html I'm using this plugin for cake https://github.com/CakeCoded/CkEditor |
# |
Dec 20th 2017, 13:51 |
hmic |
justcharlz: you can catch the exception yourself, or use find->first instead of get, if you expect the id not to exist |
# |
Dec 20th 2017, 13:42 |
matt |
@bravo-kernel I'm using cakebox and the logstash process is at 100% cpu and has been for a few hours. I've checked for large log files etc. can you suggest anything please? |
# |
Dec 20th 2017, 13:18 |
justcharlz |
:middle_finger: too :) |
# |
Dec 20th 2017, 13:17 |
saeideng |
no problem |
# |
Dec 20th 2017, 13:17 |
justcharlz |
ok. thanks for the answer |
# |
Dec 20th 2017, 13:17 |
justcharlz |
okay. didn't know you answered the question. My internet disconnected after posting the question, so I had to reload. Did not see your answer. |
# |
Dec 20th 2017, 13:17 |
saeideng |
and primary key can not null/empty |
# |
Dec 20th 2017, 13:17 |
saeideng |
get just expect a primary key id |
# |
Dec 20th 2017, 13:16 |
justcharlz |
@saeideng the record in the database table is empty so I want to know if it returns null when database is empty |
# |
Dec 20th 2017, 13:16 |
saeideng |
>when you try to get(id) >that expect a record with primary key = $id >otherwise returns an error |
# |
Dec 20th 2017, 13:15 |
saeideng |
because I answered your question above |
# |
Dec 20th 2017, 13:15 |
justcharlz |
@saeideng under the :middle_finger: |
# |
Dec 20th 2017, 13:14 |
saeideng |
returning false/null when not found any thing ? |
# |
Dec 20th 2017, 13:14 |
saeideng |
what you need? |