# |
Jun 22nd 2018, 11:27 |
saeideng |
` $routes->prefix('api/v3'` this worsks when you have app in root |
# |
Jun 22nd 2018, 11:27 |
flavius |
File uploaded https://cakesf.slack.com/files/U75U0UMR9/FBD7A3GP8/image.png / https://slack-files.com/T053DPNCM-FBD7A3GP8-2f67e315c3 - how am i supposed to test constants? I cant just undefine them unless i install some pecl "runkit" package |
# |
Jun 22nd 2018, 11:26 |
neon1024 |
Well, no, if you’re migrating the app, your Cake 3 app will still want the prefixes in right, so you can add more stuff in later |
# |
Jun 22nd 2018, 11:26 |
neon1024 |
That is what I would try and achieve, yes |
# |
Jun 22nd 2018, 11:26 |
denis |
in cake3 app all controllers placed in Controllers/blalala |
# |
Jun 22nd 2018, 11:25 |
denis |
@neon1024 Do I understand correctly? I put two applications in different folders and setting up locations in nginx? example.com -> cake2/webroot exampre.com/api/v3 -> cake3/webroot correct? |
# |
Jun 22nd 2018, 11:23 |
neon1024 |
At least with a webserver management you can migrate parts of the application a url at a time almost |
# |
Jun 22nd 2018, 11:22 |
neon1024 |
Trying to run a cake app inside a cake app would be kinda hard, especially between versions |
# |
Jun 22nd 2018, 11:22 |
neon1024 |
I would create two applications on the filesystem and switch them by url in the web server configuration |
# |
Jun 22nd 2018, 11:20 |
denis |
but this not work if i place this in subfolder location |
# |
Jun 22nd 2018, 11:19 |
denis |
this work as well |
# |
Jun 22nd 2018, 11:19 |
denis |
File uploaded https://cakesf.slack.com/files/U9CTK11C3/FBC3BPQLU/my_router.php / https://slack-files.com/T053DPNCM-FBC3BPQLU-6b1fcff862 |
# |
Jun 22nd 2018, 11:18 |
denis |
i migrate old to new but all applications must wors side-by-side |
# |
Jun 22nd 2018, 11:11 |
neon1024 |
I never liked the look of the code with `->where(['example IS NOT NULL'])` |
# |
Jun 22nd 2018, 11:10 |
neon1024 |
Thanks to whoever put in `->whereNotNull()` <3 |
# |
Jun 22nd 2018, 11:06 |
neon1024 |
That caught me out |
# |
Jun 22nd 2018, 11:06 |
neon1024 |
Notice the CAPITAL V |
# |
Jun 22nd 2018, 11:06 |
neon1024 |
Then controllers are `/src/Controller/Api/V3` |
# |
Jun 22nd 2018, 11:05 |
neon1024 |
`Router::prefix(‘api’, function (RouteBuilder $routes) { $routes->prefix(‘v3’, function (RouteBuilder $routes) {` |
# |
Jun 22nd 2018, 11:05 |
neon1024 |
I went with nested prefixed in my application |
# |
Jun 22nd 2018, 11:05 |
neon1024 |
Or are you migrating the old one over as well? |
# |
Jun 22nd 2018, 11:05 |
neon1024 |
If you’re making a new app why would you need a prefix? |
# |
Jun 22nd 2018, 10:58 |
saeideng |
install cake into `/api/v3/` :D |
# |
Jun 22nd 2018, 10:49 |
denis |
Hello! Please help me. i have cake2app in example.com/ a wont to make new api version use cake3app on example.com/api/v3/ i make nginx location to /api/v3/ how to set api/v3 as prefix in cake3app? |
# |
Jun 22nd 2018, 10:20 |
neon1024 |
https://editorconfig.org/ |
# |
Jun 22nd 2018, 10:20 |
neon1024 |
LMGTFY |
# |
Jun 22nd 2018, 10:16 |
Magiq |
what is it slightly_smiling_face ? |
# |
Jun 22nd 2018, 10:16 |
neon1024 |
This might be handy for those of us using PHP Storm, as Cake comes with an editorconfig :slightly_smiling_face: |
# |
Jun 22nd 2018, 10:15 |
neon1024 |
https://plugins.jetbrains.com/plugin/7294-editorconfig |
# |
Jun 22nd 2018, 10:10 |
saeideng |
no force to use `_id` but in this case maybe you should work a bit more |
# |
Jun 22nd 2018, 10:04 |
neon1024 |
`->control('user_id')` would look for `$users` |
# |
Jun 22nd 2018, 10:04 |
neon1024 |
Because the convention in the Form helper for form control data is that way |
# |
Jun 22nd 2018, 09:48 |
Magiq |
Why here https://github.com/FriendsOfCake/crud/blob/master/src/Listener/RelatedModelsListener.php#L94 uses association name, not propertyName ? |
# |
Jun 22nd 2018, 09:11 |
neon1024 |
:thumbsup: |
# |
Jun 22nd 2018, 09:10 |
birdy247 |
still got work to do before it feels completely right, but this was certainly a step in the right direction |
# |
Jun 22nd 2018, 09:10 |
birdy247 |
@neon1024 :+1: feels much nicer now |
# |
Jun 22nd 2018, 09:04 |
neon1024 |
https://book.cakephp.org/2.0/en/installation.html#permissions |
# |
Jun 22nd 2018, 09:00 |
santiago17 |
is that good? |
# |
Jun 22nd 2018, 09:00 |
santiago17 |
I got the permissions on user:user to app/tmp |
# |
Jun 22nd 2018, 08:58 |
neon1024 |
I’d just do what it tells you |
# |
Jun 22nd 2018, 08:49 |
santiago17 |
I am having this error now, if somebody could say something what is missing there? https://thepasteb.in/p/Elh1z2A7Dl0Cm |