# |
Jul 12th 2017, 21:03 |
nicolas.r |
no probleme like dat |
# |
Jul 12th 2017, 21:03 |
saeideng |
also you can see these params on debug_kit panel |
# |
Jul 12th 2017, 21:02 |
nicolas.r |
@konstanting personnaly i create my schema db with SQL and I do a cake bake model myModel |
# |
Jul 12th 2017, 21:02 |
ericadeefox |
@konstanting try getting rid of `'className' => 'Users'` |
# |
Jul 12th 2017, 21:02 |
saeideng |
so if you want first key/value of that you need use getParam(pass.0) |
# |
Jul 12th 2017, 21:01 |
saeideng |
`getParam('pass')` returned `[0=>1,1=>2,2=>3.3=>4]` |
# |
Jul 12th 2017, 21:01 |
slackebot |
'friend_id' ]);``` |
# |
Jul 12th 2017, 21:01 |
konstanting |
Hey folks, I'm trying to do a many to many relation in cake3 on one model. So one users can have many friends(users). I got it to work in one direction but not the other way around. Has anyone ever encountered a similar problem? Relation looks like this: ``` $this->belongsToMany('Friendships', [ 'className' => 'Users', 'joinTable' => 'users_friends', 'targetForeignKey' => 'user_id', ' |
# |
Jul 12th 2017, 21:00 |
saeideng |
when you have url like `site.com/users/show/1/2/3/4` |
# |
Jul 12th 2017, 20:59 |
saeideng |
i understand your question now from `$this->request->getParam('pass.0');` |
# |
Jul 12th 2017, 20:55 |
nicolas.r |
yup thx |
# |
Jul 12th 2017, 20:54 |
saeideng |
@nicolas.r see dereuromark tiny auth plugin |
# |
Jul 12th 2017, 20:54 |
sturm |
Definitely not good when even the tutorial just leaves you more confused. |
# |
Jul 12th 2017, 20:52 |
saeideng |
otherwise returned false |
# |
Jul 12th 2017, 20:52 |
devito |
@nicolas.r you can run shell using the shell dispatch class |
# |
Jul 12th 2017, 20:52 |
saeideng |
that return param if exist |
# |
Jul 12th 2017, 20:51 |
saeideng |
what you mean from `getParam` and an `id` |
# |
Jul 12th 2017, 20:50 |
nicolas.r |
no :s |
# |
Jul 12th 2017, 20:49 |
burzum |
is anyone here using the cakephp elastic search plugin for doing an aggregation (distinct like)? |
# |
Jul 12th 2017, 20:48 |
sturm |
Not as green as I am. |
# |
Jul 12th 2017, 20:47 |
nicolas.r |
i'm too newbie to answer you i guess |
# |
Jul 12th 2017, 20:47 |
nicolas.r |
no idea :P |
# |
Jul 12th 2017, 20:47 |
sturm |
@nicolas.r I don’t know how to answer that. I’m studying the “Restricting Bookmark Access” portion of the bookmarker tutorial. |
# |
Jul 12th 2017, 20:45 |
nicolas.r |
what kind of request ? |
# |
Jul 12th 2017, 20:45 |
ericadeefox |
it got went over in the basic app workshop this year at CakeFest |
# |
Jul 12th 2017, 20:43 |
nicolas.r |
@ericadeefox tell me if you remember ^^ |
# |
Jul 12th 2017, 20:43 |
sturm |
I’m guessing that `$this->request->getParam('pass.0')` should always return an *id* (if it exists)? |
# |
Jul 12th 2017, 20:41 |
ericadeefox |
there's a term for that, when you've got basically a separate branch of folders for admin privileges... I can't think of what the word is right now... |
# |
Jul 12th 2017, 20:33 |
sturm |
I’ll eventually need to deal with that on my Scheduling app. |
# |
Jul 12th 2017, 20:29 |
nicolas.r |
thx |
# |
Jul 12th 2017, 20:29 |
nicolas.r |
oh okey, I will take a look at |
# |
Jul 12th 2017, 20:28 |
devito |
you can specify on a grainular level what a user has access to |
# |
Jul 12th 2017, 20:28 |
devito |
i use the ACL plugin for that |
# |
Jul 12th 2017, 20:27 |
nicolas.r |
but dunno it |
# |
Jul 12th 2017, 20:27 |
nicolas.r |
I can put in all these function a redirect if is not admin but I think there is a better way |
# |
Jul 12th 2017, 20:27 |
nicolas.r |
not allow these function |
# |
Jul 12th 2017, 20:27 |
nicolas.r |
view, edit, delete etc.. |
# |
Jul 12th 2017, 20:27 |
nicolas.r |
Like all the function in the controller |
# |
Jul 12th 2017, 20:27 |
nicolas.r |
tell me, maybe you know, do you know how to not allow a page to a user? |
# |
Jul 12th 2017, 20:26 |
nicolas.r |
:slightly_smiling_face: |
# |
Jul 12th 2017, 20:26 |
devito |
ill give that a shot |