# |
Jul 17th 2018, 09:51 |
saeideng |
`setError` |
# |
Jul 17th 2018, 09:51 |
josbeir |
i'm not sure tho, you should check the docs/code for that |
# |
Jul 17th 2018, 09:50 |
josbeir |
i don't think so |
# |
Jul 17th 2018, 09:46 |
abdualelah.mdy |
@josbeir can I mark both fields as error ? |
# |
Jul 17th 2018, 09:39 |
abdualelah.mdy |
Thank you very much :heart_eyes: |
# |
Jul 17th 2018, 09:39 |
neon1024 |
https://book.cakephp.org/3.0/en/orm/validation.html#creating-unique-field-rules |
# |
Jul 17th 2018, 09:39 |
josbeir |
add that to your buildRules method in your model |
# |
Jul 17th 2018, 09:38 |
josbeir |
$rules->add(new IsUnique([ 'field1, 'field2' ]), 'skuUnique', [ 'errorField' => 'field1', 'message' => __d('admin', 'The item already exists') ]); |
# |
Jul 17th 2018, 09:38 |
abdualelah.mdy |
I have question : How can I check if the combination of 2 columns in my table is unique ? |
# |
Jul 17th 2018, 09:36 |
abdualelah.mdy |
hello everyone |
# |
Jul 17th 2018, 09:34 |
josbeir |
for |
# |
Jul 17th 2018, 09:34 |
josbeir |
:P |
# |
Jul 17th 2018, 09:34 |
josbeir |
i'm going to src/Listeners |
# |
Jul 17th 2018, 09:34 |
neon1024 |
Depends if you like them closer to your models I guess, I just find them harder to find tucked away in other folders |
# |
Jul 17th 2018, 09:34 |
josbeir |
or Listeners |
# |
Jul 17th 2018, 09:34 |
josbeir |
src/Lib/Events |
# |
Jul 17th 2018, 09:34 |
josbeir |
yeah me too |
# |
Jul 17th 2018, 09:33 |
neon1024 |
Sometimes `src/Lib/Listeners` |
# |
Jul 17th 2018, 09:33 |
neon1024 |
@josbeir I tend to actually use`src/Listeners` myself |
# |
Jul 17th 2018, 09:31 |
josbeir |
place model related listeners in src/Model/EventListeners or place them in a global src/EventListeners or ... |
# |
Jul 17th 2018, 09:29 |
josbeir |
any suggestions ? |
# |
Jul 17th 2018, 09:29 |
josbeir |
i'm always struggling in wich folder to place EventListeners |
# |
Jul 17th 2018, 09:26 |
snake-venom |
hi. i have question.. if i will develop a large application in cakephp 3 then if they cakephp 4 released then how much it will tough/ feasible to update from cakephp 3 to cakephp 4 ? |
# |
Jul 17th 2018, 09:19 |
josbeir |
if you start developing in cake 3.6.x then migration would be not that painfull |
# |
Jul 17th 2018, 09:17 |
snake-venom |
hi. i have question.. if i will develop a large application in cakephp 3 then if they cakephp 4 released then how much it will tough/ feasible to update from cakephp 3 to cakephp 4 ? |
# |
Jul 17th 2018, 09:07 |
jraavis |
Hello all, is there any article to learn "How to create a theme/template on cakephp 2" ? |
# |
Jul 17th 2018, 08:51 |
megan |
Hi Rakesh! There is no coupon code for the training but theres only a $2 donation to CakeSF for the Getting started with CakePHP 3 training session - http://training.cakephp.org/ |
# |
Jul 17th 2018, 08:43 |
Rakesh |
need coupon code for cakephp 3 training |
# |
Jul 17th 2018, 08:42 |
Rakesh |
CakePHP 3 any coupon code for cakephp 3 training |
# |
Jul 17th 2018, 08:40 |
josbeir |
needed select2.. |
# |
Jul 17th 2018, 08:40 |
josbeir |
pff @admad i went to the darkside on my new project, i added jquery :,( :,( :,( |
# |
Jul 17th 2018, 08:40 |
Rakesh |
Hi Everyone |
# |
Jul 17th 2018, 08:37 |
josbeir |
i never did the tutorial, mvc pattern is probably also explained over there: -) |
# |
Jul 17th 2018, 08:37 |
mr.mjsm |
ok thank you sir |
# |
Jul 17th 2018, 08:37 |
josbeir |
read up on mvc, then do the tutorial |
# |
Jul 17th 2018, 08:36 |
mr.mjsm |
ok so i read MVC then CMS ? |
# |
Jul 17th 2018, 08:36 |
josbeir |
don't let this talk frighten you tho, i'm sure you will get stuff up and runing in a while :slightly_smiling_face: |
# |
Jul 17th 2018, 08:35 |
admad |
the manual is available is multiple languages, so if translation is available in your native language use that |
# |
Jul 17th 2018, 08:35 |
josbeir |
it will shed a light on most of the things you need to know before you start |
# |
Jul 17th 2018, 08:35 |
josbeir |
maybe first read up on the basics on MVC patterns in development |
# |
Jul 17th 2018, 08:35 |
admad |
you English seems decent enough, don't see why you cannot follow the tutorials :slightly_smiling_face: |