# |
Jul 20th 2017, 09:41 |
hmic |
depends on what you do |
# |
Jul 20th 2017, 09:41 |
josexato |
from that point* |
# |
Jul 20th 2017, 09:41 |
josexato |
@hmic from point, do you think that using the views and templates in cake are not the best option to lauch a platform to the public? |
# |
Jul 20th 2017, 09:39 |
saeideng |
but you no force to using this plugin |
# |
Jul 20th 2017, 09:39 |
saeideng |
and is very useful |
# |
Jul 20th 2017, 09:39 |
saeideng |
even that sent to you redirect url for especial usage |
# |
Jul 20th 2017, 09:38 |
saeideng |
this pluggin separate response content and error message |
# |
Jul 20th 2017, 09:37 |
saeideng |
i personally use dereuromark ajax plugin |
# |
Jul 20th 2017, 09:35 |
hmic |
use a frontend framework and an api to get your data :p |
# |
Jul 20th 2017, 09:35 |
hmic |
ajax is so 2000... |
# |
Jul 20th 2017, 09:35 |
saeideng |
``` $.ajax({ type: 'get', url: '?php echo $this->Html->url(['action' => 'favorites']); ?', success: function(response) { $('#target').html(response); }, error: function(e) { console.log(e); } }); ``` |
# |
Jul 20th 2017, 09:34 |
neon1024 |
If you want a super basic introduction, https://www.w3schools.com/xml/ajax_intro.asp |
# |
Jul 20th 2017, 09:33 |
saeideng |
cake 3 have not helper for this |
# |
Jul 20th 2017, 09:32 |
saeideng |
you just need js to send ajax request |
# |
Jul 20th 2017, 09:32 |
josexato |
thanks, the views documentations is what is a bit fuzzy, I am still trying to undestand it better |
# |
Jul 20th 2017, 09:30 |
saeideng |
in controller area |
# |
Jul 20th 2017, 09:30 |
saeideng |
but you can detect it by `$this->request->is('ajax')` |
# |
Jul 20th 2017, 09:29 |
saeideng |
ajax and normal request is equal |
# |
Jul 20th 2017, 09:28 |
josexato |
thank, I am using cake 3 but i'll read to understand the aproach |
# |
Jul 20th 2017, 09:28 |
neon1024 |
http://sandbox.dereuromark.de/sandbox/jquery-examples> => <https://github.com/dereuromark/cakephp-sandbox/tree/3.0/plugins/Sandbox/src/Template/AjaxExamples |
# |
Jul 20th 2017, 09:28 |
saeideng |
ajax is very simple in cakephp3 |
# |
Jul 20th 2017, 09:28 |
saeideng |
but is useful to reading it |
# |
Jul 20th 2017, 09:27 |
saeideng |
this used a plugin on cake2 |
# |
Jul 20th 2017, 09:27 |
saeideng |
http://www.dereuromark.de/2014/01/09/ajax-and-cakephp/ |
# |
Jul 20th 2017, 09:24 |
josexato |
Hello, I am looking to do a view that updates by it self, I think this is ajax, I've search for this in the cookbook but did not find anything explicit in how to implement an ajax view. can you please recomend me some tutorial? |
# |
Jul 20th 2017, 09:19 |
saeideng |
good morning |
# |
Jul 20th 2017, 09:17 |
lorenzo |
good morning :slightly_smiling_face: |
# |
Jul 20th 2017, 09:17 |
lorenzo |
hehe |
# |
Jul 20th 2017, 09:12 |
neon1024 |
@lorenzo even! |
# |
Jul 20th 2017, 09:12 |
neon1024 |
On another note, Morning @lorello |
# |
Jul 20th 2017, 09:08 |
neon1024 |
It’s a minor thing, but it just popped into my brain when I saw it |
# |
Jul 20th 2017, 09:08 |
neon1024 |
They’re feature toggles I guess |
# |
Jul 20th 2017, 09:06 |
lorenzo |
I think it is ok to have a few Configure::read() around, it if is static configuration (defined n the bootstrap or app.php) |
# |
Jul 20th 2017, 09:06 |
lorenzo |
what configuration do you want to pass? |
# |
Jul 20th 2017, 09:03 |
neon1024 |
Passing configuration to a helper or similar is very simple, but with a controller it doesn’t feel as obvious |
# |
Jul 20th 2017, 09:03 |
neon1024 |
Is it ‘okay’ for Controllers to read from Configure::read() as it feels like this is an object reaching out for it’s dependancies rather than being given them on creation |
# |
Jul 20th 2017, 08:29 |
mirec |
no, these are two different problems |
# |
Jul 20th 2017, 08:26 |
sonu_nk |
Does the SSL include XSS protection as well? |
# |
Jul 20th 2017, 07:54 |
mirec |
morning :) |
# |
Jul 20th 2017, 07:53 |
neon1024 |
Morning everyone |
# |
Jul 20th 2017, 05:57 |
miks |
just did hahaha thanks. |