# |
Jan 15th 2018, 08:44 |
learningcake |
Good morning House. I tried selecting columns whose data range from timecreated to a 30days interval but it seems not to be working. What am I doing wrong? here is my code $check = $this->Stores->find('all',['Stores.user_id'=>$user,'Stores.created + INTERVAL 30 DAY >' => Time::NOW() ])->toArray(); |
# |
Jan 15th 2018, 00:06 |
jarard |
anyone here? |
# |
Jan 14th 2018, 12:22 |
saeideng |
https://github.com/cakephp/app/blob/master/src/Controller/AppController.php#L44 |
# |
Jan 14th 2018, 12:12 |
maymeow |
adn add to your controller (if its actual) ``` public function initialize() { parent::initialize(); $this->loadComponent('RequestHandler'); } ``` |
# |
Jan 14th 2018, 10:37 |
jack_sonu |
i dont want to instal CRUD plugin so i skip this step |
# |
Jan 14th 2018, 10:34 |
saeideng |
https://pastebin.com/FesjCZ80 |
# |
Jan 14th 2018, 10:31 |
jack_sonu |
already added bro |
# |
Jan 14th 2018, 10:30 |
saeideng |
try `Router::extensions(['json', 'xml']);` |
# |
Jan 14th 2018, 10:28 |
jack_sonu |
any idea why its giving me error ? |
# |
Jan 14th 2018, 10:27 |
jack_sonu |
with this http://www.bravo-kernel.com/2015/04/how-to-build-a-cakephp-3-rest-api-in-minutes/ i am trying to create a api. but myurl.com/forms.json giving me error "Template file \"Forms/json/index.ctp\" is missing." |
# |
Jan 14th 2018, 10:26 |
jack_sonu |
hi |
# |
Jan 14th 2018, 05:27 |
Pat |
Hello |
# |
Jan 14th 2018, 01:56 |
jason001 |
is cake awake? |
# |
Jan 13th 2018, 19:58 |
greenjam94 |
Yeah I replaced that with find() and it works perfect |
# |
Jan 13th 2018, 19:54 |
maymeow |
there is a custom finder method :slightly_smiling_face: `find('popular')` |
# |
Jan 13th 2018, 19:52 |
greenjam94 |
ahh this is much simpler than what I was trying with a custom finder method, ty |
# |
Jan 13th 2018, 19:49 |
maymeow |
``` public function index() { $query = $this->Articles->find('popular')->where(['author_id' => 1]); $this->set('articles', $this->paginate($query)); } ``` |
# |
Jan 13th 2018, 19:49 |
maymeow |
yes :slightly_smiling_face: https://book.cakephp.org/3.0/en/controllers/components/pagination.html |
# |
Jan 13th 2018, 19:47 |
greenjam94 |
Hey, is it possible to filter a paginator's results? for example, a documents model and index view with baked paginator table. If the docs have a type field, can I say only documents with type == notes |
# |
Jan 13th 2018, 19:37 |
maymeow |
@@ |
# |
Jan 13th 2018, 19:12 |
tephysalazar |
how i can get the view from a HABTM association? cake bake generate the files to use a single primary key, but should have been a compound key. |
# |
Jan 13th 2018, 18:52 |
hmic |
crud does not care about auth IMHO |
# |
Jan 13th 2018, 18:49 |
birdy247 |
is this possible? |
# |
Jan 13th 2018, 18:49 |
birdy247 |
I am trying to get the Auth'd userid from CRUD |
# |
Jan 13th 2018, 18:21 |
birdy247 |
is CRUD still well supported? |
# |
Jan 13th 2018, 18:05 |
dereuromark |
for some reason it doesnt fall back to core ones |
# |
Jan 13th 2018, 18:05 |
dereuromark |
unfortunately, you have too, yeah |
# |
Jan 13th 2018, 17:15 |
cgtag |
I have error views in a plugin, but have to copy it to my `Template/Error` folder for it to be used. Is this correct? |
# |
Jan 13th 2018, 17:12 |
cgtag |
does cake render error views from plugins? |
# |
Jan 13th 2018, 17:08 |
maymeow |
https://github.com/MayMeow/sandbox Trying to use VueJS with CakePHP. First example is there (more will come). Maybe for someone can be usefull. |
# |
Jan 13th 2018, 16:08 |
birdy247 |
Hey |
# |
Jan 13th 2018, 15:18 |
kitcat711 |
i am using through |
# |
Jan 13th 2018, 15:11 |
hmic |
if you are not using through, there is none. |
# |
Jan 13th 2018, 15:08 |
kitcat711 |
hmic : oh ok, I was trying the relation to get to it |
# |
Jan 13th 2018, 15:07 |
hmic |
by loading the table from the regisry i suppose |
# |
Jan 13th 2018, 15:06 |
kitcat711 |
how do I call a method located in the join table model from the StudentsController ? |
# |
Jan 13th 2018, 15:05 |
kitcat711 |
when usign the trhough option in a relation like here : https://book.cakephp.org/3.0/en/orm/associations.html#using-the-through-option |
# |
Jan 13th 2018, 14:09 |
dinosaur |
done. Was vhost config |
# |
Jan 13th 2018, 13:56 |
dinosaur |
Untampered .htaccess webroot = drwxr-xr-x webroot/css = drwxrwxrwx no error messages |
# |
Jan 13th 2018, 13:53 |
admad |
assuming you have the default rule in .htaccess could be file/folder permissions issue |
# |
Jan 13th 2018, 13:50 |
dinosaur |
Trying to figuring out why it is not |