# |
Nov 28th 2017, 16:54 |
neon1024 |
joopm, Can you pastebin your table associations? |
# |
Nov 28th 2017, 16:54 |
neon1024 |
Just a guess, but you probably meant `newQuery()` |
# |
Nov 28th 2017, 16:54 |
neon1024 |
obinoob, https://gist.github.com/anonymous/f50fd972d94795f75ba91b6c321dd91b#file-controller-php-L14 |
# |
Nov 28th 2017, 16:48 |
joopm |
when try to use it in the contain |
# |
Nov 28th 2017, 16:48 |
joopm |
but i have an error : SQLSTATE[42S02]: Base table or view not found: |
# |
Nov 28th 2017, 16:48 |
joopm |
Sender,and Receiver |
# |
Nov 28th 2017, 16:48 |
joopm |
i made 2 different type of association to the same model(belongsto,belongstoMany) |
# |
Nov 28th 2017, 16:36 |
obinoob |
I'm getting: Call to a member function insert() on null this is my code : https://gist.github.com/anonymous/f50fd972d94795f75ba91b6c321dd91b |
# |
Nov 28th 2017, 15:49 |
neon1024 |
Cool, well I’ll make a note on my issue and get that closed |
# |
Nov 28th 2017, 15:46 |
neon1024 |
Ah cool, yeah I think this is what I was looking for :slightly_smiling_face: https://github.com/UseMuffin/Slug/blob/master/tests/TestCase/Model/Behavior/SlugBehaviorTest.php#L123-L126 |
# |
Nov 28th 2017, 15:46 |
admad |
Earlier the behavior just bailed out when slug field was dirty (aka preset) |
# |
Nov 28th 2017, 15:45 |
admad |
Guess i forgot to add it to readme when i added that option few months ago |
# |
Nov 28th 2017, 15:44 |
admad |
can copy it from the docblock https://github.com/UseMuffin/Slug/blob/master/src/Model/Behavior/SlugBehavior.php#L46 |
# |
Nov 28th 2017, 15:43 |
admad |
yes |
# |
Nov 28th 2017, 15:43 |
neon1024 |
Does `onDirty` need adding to the docs? https://github.com/UseMuffin/Slug#configuration |
# |
Nov 28th 2017, 15:42 |
neon1024 |
Great. Thanks @admad I’ll give that a try then |
# |
Nov 28th 2017, 15:42 |
neon1024 |
Oh, I thought it would do that already! |
# |
Nov 28th 2017, 15:42 |
admad |
slugging is data sanitization |
# |
Nov 28th 2017, 15:41 |
neon1024 |
Hard to determine scope I think :slightly_smiling_face: |
# |
Nov 28th 2017, 15:41 |
admad |
setting `onDirty` config to true will ensure even user entered slug value is cleaned and checked for uniqueness |
# |
Nov 28th 2017, 15:41 |
neon1024 |
Should the slugger do data sanitisation? |
# |
Nov 28th 2017, 15:41 |
admad |
even use entered value should be cleaned |
# |
Nov 28th 2017, 15:41 |
neon1024 |
Well that’s either (a) Their funeral or (b) Caught by userland slug validation rule |
# |
Nov 28th 2017, 15:40 |
admad |
what if the value is unique but user has entered crap in the string like space chars? |
# |
Nov 28th 2017, 15:40 |
neon1024 |
Does that make sense? |
# |
Nov 28th 2017, 15:40 |
neon1024 |
But if the value is empty, the slugger would make a slug |
# |
Nov 28th 2017, 15:40 |
neon1024 |
To allow more granular implementation based on the existing entity value |
# |
Nov 28th 2017, 15:39 |
neon1024 |
So it’s decoupling the rules and validation from the actual slugging |
# |
Nov 28th 2017, 15:39 |
neon1024 |
As the value would be a slug, but user input |
# |
Nov 28th 2017, 15:39 |
neon1024 |
It wouldn’t slug the value, but instead just check it’s a valid slug |
# |
Nov 28th 2017, 15:38 |
neon1024 |
@admad No, the opposite of that, by about 35% |
# |
Nov 28th 2017, 15:38 |
johnwayne |
Does anybody use DataTables with cakePhp (pagination, filters etc.)? |
# |
Nov 28th 2017, 15:38 |
admad |
@neon1024 so you want the slugger to run even when you have preset a value for the slug field? |
# |
Nov 28th 2017, 15:37 |
neon1024 |
Just use `->count()` ? |
# |
Nov 28th 2017, 15:29 |
hugobapgomes |
hey guys, is it possible to do a query with ->group([*]) and somewhere returns an count of the grouped items? |
# |
Nov 28th 2017, 15:07 |
neon1024 |
As above. |
# |
Nov 28th 2017, 15:07 |
birdy247 |
what was the problem? |
# |
Nov 28th 2017, 15:06 |
neon1024 |
Might make an RFC for that so ADmad can close it |
# |
Nov 28th 2017, 15:06 |
neon1024 |
Would be nice if it looked for the field, and if it wasn’t in the post data, or was empty it generated a slug and if it wasn’t then it just used what was posted, but still checked for uniqueness |
# |
Nov 28th 2017, 15:05 |
neon1024 |
Where is Jadb anyway?! |
# |
Nov 28th 2017, 15:04 |
neon1024 |
That would be a good place to use Muffin/Slug! |