# |
Jul 2nd 2017, 11:36 |
wouter0100 |
ng like Schema in the JsonApi plugin). Is there any other best-practice in Cake or someting like that? |
# |
Jul 2nd 2017, 11:36 |
wouter0100 |
Hmm, I'm developing a REST API in Cake (with stateless auth) but, what's the best way to implement authorization to cartian attributes from models? For example, I want to show more data to the authenitcated user's own objects, then others. Currently using JsonView, but I'm thinking of implementing my own view for each object to filter data (somethi |
# |
Jul 2nd 2017, 09:46 |
casmo |
It is as long as I remember it. Using the bake migration CreateTable field:text |
# |
Jul 2nd 2017, 09:44 |
savant |
does that break something? |
# |
Jul 2nd 2017, 09:44 |
savant |
is that how its currently documented? |
# |
Jul 2nd 2017, 09:44 |
savant |
not sure |
# |
Jul 2nd 2017, 09:44 |
casmo |
Phinx* btw |
# |
Jul 2nd 2017, 09:41 |
casmo |
Should it not be default=>null, null => true? |
# |
Jul 2nd 2017, 09:41 |
casmo |
Is there a reason why Sphinx sets the default properties of a 'text' column to ['default' => null, 'null' => false]? |
# |
Jul 2nd 2017, 05:53 |
royalty |
that makes sense |
# |
Jul 2nd 2017, 05:52 |
royalty |
i seee |
# |
Jul 2nd 2017, 05:52 |
savant |
then the layout template |
# |
Jul 2nd 2017, 05:52 |
savant |
first the inner template |
# |
Jul 2nd 2017, 05:52 |
savant |
two step rendering |
# |
Jul 2nd 2017, 05:52 |
savant |
you were basically resetting it |
# |
Jul 2nd 2017, 05:52 |
savant |
no problem |
# |
Jul 2nd 2017, 05:51 |
royalty |
thanks |
# |
Jul 2nd 2017, 05:49 |
royalty |
yeah that worked |
# |
Jul 2nd 2017, 05:48 |
royalty |
ahh interesting |
# |
Jul 2nd 2017, 05:48 |
savant |
use append() |
# |
Jul 2nd 2017, 05:48 |
savant |
instead of start() |
# |
Jul 2nd 2017, 05:48 |
savant |
i think in your layout |
# |
Jul 2nd 2017, 05:48 |
royalty |
you have to assume that the actual.ctp is using layout.ctp as it's layout obviously |
# |
Jul 2nd 2017, 05:47 |
royalty |
updated |
# |
Jul 2nd 2017, 05:47 |
royalty |
https://gist.github.com/Modicrumb/3194d89c4d3fca329ae77bbf2973f17a |
# |
Jul 2nd 2017, 05:46 |
royalty |
I'll show both examples |
# |
Jul 2nd 2017, 05:46 |
royalty |
i'm saying i tried both |
# |
Jul 2nd 2017, 05:46 |
royalty |
even with an append though it doesn't work |
# |
Jul 2nd 2017, 05:45 |
royalty |
but defining the block in the options |
# |
Jul 2nd 2017, 05:45 |
royalty |
not appending |
# |
Jul 2nd 2017, 05:45 |
savant |
i dont see where you are appending? |
# |
Jul 2nd 2017, 05:44 |
royalty |
if i just don't start and end the block though it does append and problem solved lol |
# |
Jul 2nd 2017, 05:44 |
royalty |
https://gist.github.com/Modicrumb/3194d89c4d3fca329ae77bbf2973f17a |
# |
Jul 2nd 2017, 05:41 |
royalty |
yeah let me make a quick gist |
# |
Jul 2nd 2017, 05:41 |
savant |
we do something similar in CrudView to allow people to inject elements etc. into blocks |
# |
Jul 2nd 2017, 05:40 |
savant |
can you show an example of what you’re trying to do? |
# |
Jul 2nd 2017, 05:38 |
royalty |
no need to contain the scripts initially in a block |
# |
Jul 2nd 2017, 05:38 |
royalty |
eh i'm just going to spit out the scripts regardless and put the blocks after, heh |
# |
Jul 2nd 2017, 05:36 |
royalty |
but just curious why this is happening i guess |
# |
Jul 2nd 2017, 05:36 |
royalty |
i mean at the end of the day the initial content doesn't need to be in the block anyway i could make it come before the block |
# |
Jul 2nd 2017, 05:34 |
royalty |
ie, not using $this->start allows me to actually put stuff in the block but appending to a block doesn't seem to work if i am "initializing a block with content" |