# |
Dec 4th 2017, 19:29 |
inoas |
for now I am happy with the immensive benefits of http2 |
# |
Dec 4th 2017, 19:29 |
inoas |
i am setting things in close logical proximity but I will have to find a better way at some point in time |
# |
Dec 4th 2017, 19:28 |
inoas |
(and maybe we should.) |
# |
Dec 4th 2017, 19:28 |
inoas |
but then we can just remove the whole <head> block of html :) |
# |
Dec 4th 2017, 19:28 |
inoas |
well in theory I do, yes |
# |
Dec 4th 2017, 19:28 |
inoas |
I should not but I was not eager to pull out what stylesheets are required out of layout.ctp |
# |
Dec 4th 2017, 19:28 |
hmic |
you are using a middleware to to that, or at least utilize the response in the controller |
# |
Dec 4th 2017, 19:27 |
inoas |
well I am ;-) |
# |
Dec 4th 2017, 19:27 |
hmic |
:P |
# |
Dec 4th 2017, 19:27 |
hmic |
you are not using header() in your app |
# |
Dec 4th 2017, 19:26 |
inoas |
things like this header(sprintf('Link: <%s>; rel=preload; as=style', $this->Url->assetUrl($criticalCssAsset)), false) (http2) |
# |
Dec 4th 2017, 19:26 |
hmic |
inoas, you can (re)set it any time! |
# |
Dec 4th 2017, 19:26 |
inoas |
but that's global and I am using assetUrl() a lot and I think that's too late then |
# |
Dec 4th 2017, 19:26 |
admad |
inoas: other option is just set https://github.com/cakephp/app/blob/master/config/app.default.php#L50 |
# |
Dec 4th 2017, 19:25 |
inoas |
Be back later! trying |
# |
Dec 4th 2017, 19:25 |
inoas |
good. |
# |
Dec 4th 2017, 19:25 |
inoas |
and thats it? |
# |
Dec 4th 2017, 19:24 |
admad |
inoas: load your custom helper in appview with alias "Url" and all other helpers loaded after will use your's instead of core UrlHelper |
# |
Dec 4th 2017, 19:24 |
hmic |
why dont you just use the fullBaseUrl? |
# |
Dec 4th 2017, 19:22 |
inoas |
but it is only loaded indirectly through HtmlHelper and alike |
# |
Dec 4th 2017, 19:22 |
inoas |
hm in cakephp3 I want to replace HtmlHelper->assetUrl() so that all urls generated are prefixed with a domain such as static-domain.tld |
# |
Dec 4th 2017, 19:19 |
hmic |
so lets go on... |
# |
Dec 4th 2017, 19:19 |
obinoob |
regarding that i guess it's all nicely done... |
# |
Dec 4th 2017, 19:18 |
obinoob |
ok fine I was told that you could find cardinality by reading both directions but that will count only to know where to put the foreign key |
# |
Dec 4th 2017, 19:17 |
hmic |
so every belongsTo has a matching hasOne (or hasMany) association in the other table |
# |
Dec 4th 2017, 19:17 |
hmic |
you are looking at the same thing, just from 2 different sides. which side is which is determined by the position of the foreign key. thats it. |
# |
Dec 4th 2017, 19:16 |
hmic |
and which way is the correct way is determined by the table that has the foreign key field alone. nothing else! |
# |
Dec 4th 2017, 19:16 |
hmic |
it's either belongsTo *or* hasOne/-Many side. not both. |
# |
Dec 4th 2017, 19:15 |
hmic |
obinoob, no. it's not |
# |
Dec 4th 2017, 19:15 |
obinoob |
thus my doubt |
# |
Dec 4th 2017, 19:15 |
hmic |
the table the foreign id field is in is the only thing that defines the association - the table that has it, is the belongsTo side, ever, ever, ever. towns hasOne (or Many) addresses in this case |
# |
Dec 4th 2017, 19:15 |
obinoob |
however each address hasOne town_id |
# |
Dec 4th 2017, 19:15 |
obinoob |
ok I've done that, meaning that the column town_id in addresses belongs to towns |
# |
Dec 4th 2017, 19:14 |
hmic |
if it's in the addresses, it's addresses belongsTo towns |
# |
Dec 4th 2017, 19:14 |
obinoob |
Addresses |
# |
Dec 4th 2017, 19:14 |
hmic |
in which table is the town_id field? |
# |
Dec 4th 2017, 19:09 |
obinoob |
hmic I think so, I have a small doubt reading relation between: Addresses "might" have 0 or 1 Towns! Is this not meaning that address should have the following: belongsTo and asOne for town_id ? |
# |
Dec 4th 2017, 19:08 |
hmic |
give it a try |
# |
Dec 4th 2017, 19:07 |
obinoob |
hmic I need to refractor my model relations... I've just notice that I might be missing a few important steps here! Or I might be wrong either... |
# |
Dec 4th 2017, 18:55 |
hmic |
obinoob, paginate addresses table instead of clients |
# |
Dec 4th 2017, 18:50 |
obinoob |
hmic I'm not following... '=( |