# |
Jul 10th 2019, 13:54 |
lubos |
What is the best way to move one item from the collection to the end? |
# |
Jul 10th 2019, 13:41 |
neon1024 |
:) |
# |
Jul 10th 2019, 13:41 |
neon1024 |
No, starting with a `/` as in root |
# |
Jul 10th 2019, 13:41 |
this.impetus |
yeah, I got it, tyvm, it was a silly mistake on my part |
# |
Jul 10th 2019, 13:41 |
this.impetus |
oh my goodness. I see now. I was writing the URL wrong; it can't be relative from JS's perspective (ie. ../img/file.jpg doesn't work) |
# |
Jul 10th 2019, 13:40 |
neon1024 |
So `background-image: /img/example.jpg` would work as would `background-image: http://example.com/img/background-image.jpg` I’d think |
# |
Jul 10th 2019, 13:40 |
neon1024 |
In most instances web servers should be setup to serve files and folders directly |
# |
Jul 10th 2019, 13:40 |
neon1024 |
That will depend on the web server configuration |
# |
Jul 10th 2019, 13:39 |
this.impetus |
but I think I'm explaining myself poorly, or else I've misunderstood... can I just provide explicit URIs for content in the webroot folder? isn't it captured by modrewrite or something (not a backend guy, forgive me if I sound ridiculous)? |
# |
Jul 10th 2019, 13:37 |
this.impetus |
`style=` I rather think |
# |
Jul 10th 2019, 13:36 |
neon1024 |
Or is it without single quotes? I forget |
# |
Jul 10th 2019, 13:36 |
neon1024 |
`<div class="background-image: '/img/example.jpg'"></div>` Is what I’d use personally |
# |
Jul 10th 2019, 13:34 |
this.impetus |
Hey guys, front-end guy here stuck on a problem. Creating a dynamic element that's intended to have it's `background-image` CSS change via a JS UI. But relative URL's don't play nice with cake. Can anyone advise on the best 'cakeian' approach for serving an image to dynamic CSS ? |
# |
Jul 10th 2019, 13:32 |
neon1024 |
This chapter runs you through the whole process |
# |
Jul 10th 2019, 13:32 |
neon1024 |
@revillosakristianpaol https://book.cakephp.org/3.0/en/orm/database-basics.html#data-types |
# |
Jul 10th 2019, 13:31 |
revillosakristianpaol |
@neo21181 how can i do it? its my first hearing this hahaha |
# |
Jul 10th 2019, 13:30 |
neon1024 |
@felix.robaglia This is the plugin I’d recommend taking a look at https://github.com/usemuffin/footprint |
# |
Jul 10th 2019, 13:29 |
felix.robaglia |
Thanks a lot @neon1024, i'll watch this way then! |
# |
Jul 10th 2019, 13:29 |
neon1024 |
@revillosakristianpaol Personally I would create a new Data Type class for this |
# |
Jul 10th 2019, 13:29 |
neon1024 |
@felix.robaglia Sure, you’d use a plugin for that https://github.com/FriendsOfCake/awesome-cakephp#auditing--logging |
# |
Jul 10th 2019, 13:28 |
revillosakristianpaol |
is there a way to treat tinyint as regular int? im currently facing issues regarding conversion of string to bool (which is my data is -1,0,1) |
# |
Jul 10th 2019, 13:27 |
revillosakristianpaol |
hi |
# |
Jul 10th 2019, 13:26 |
felix.robaglia |
Hello, I want to store in the database the id of the last user who modified this row (column name is id_latest_user_update). Do I have an easy way to tell cakePHP : "Everytime you update a field, set id_latest_user_update to current session id" ? Thanks :slightly_smiling_face: |
# |
Jul 10th 2019, 13:23 |
davorminchorov |
Hi, Does anyone here know why do I see `File not found.` when I open my app in the browser? |
# |
Jul 10th 2019, 13:14 |
rajesh |
@admad we also need immutable finish from msd and jaddu :slightly_smiling_face: |
# |
Jul 10th 2019, 12:36 |
inoas |
lorenzo yeah that would be really nice to go the immutable route :) |
# |
Jul 10th 2019, 12:36 |
admad |
and our batting after the 3 top is equally shitty |
# |
Jul 10th 2019, 12:34 |
admad |
@neon1024 your shitty weather screwed us over :P |
# |
Jul 10th 2019, 12:28 |
lorenzo |
sad that the pipe operator never got a voting |
# |
Jul 10th 2019, 12:27 |
lorenzo |
no, you need to filter then out with distinct or group by |
# |
Jul 10th 2019, 12:21 |
inoas |
thanks for pointing the way without difficult exists/union things |
# |
Jul 10th 2019, 12:19 |
inoas |
so I get some true duplicates that I can remove with distinct - there is nothing I can do abou,r ight? |
# |
Jul 10th 2019, 12:18 |
inoas |
ok will do the same - a pipe operator would be nice https://wiki.php.net/rfc/pipe-operator |
# |
Jul 10th 2019, 12:13 |
lorenzo |
I prefer assigning the variable again |
# |
Jul 10th 2019, 12:12 |
inoas |
btw is it good style to write $query = $query->mutatingBuilderMethod() or just $query->mutatingBuilderMethod? |
# |
Jul 10th 2019, 12:10 |
lorenzo |
no, the the where() clause needs to be in the parent query |
# |
Jul 10th 2019, 12:10 |
inoas |
so not within the closure |
# |
Jul 10th 2019, 12:10 |
lorenzo |
`leftJoinWith('TariffsManufacturers.Manufacturers')->where(['OR' => ['Manufacturers.id IS' =>null, $conditions])` |
# |
Jul 10th 2019, 12:10 |
inoas |
working on that now - thanks |
# |
Jul 10th 2019, 12:09 |
lorenzo |
ionas I think I just wrote the exact code 2 messages ago :slightly_smiling_face: |
# |
Jul 10th 2019, 12:05 |
inoas |
lorenzo I got a working reduced case in raw SQL now: https://gist.github.com/inoas/18618c0ad24ec11d27867dd923322a6c - but I am not sure how to best translate that to the orm |