# |
Jun 25th 2018, 09:46 |
unclezoot |
thanks josbeir, unfortunately i need to log who last touched the record too - have never been able to get Muffin\Footprint working reliably so i do the save manually |
# |
Jun 25th 2018, 09:44 |
neon1024 |
`curl -v -X POST` |
# |
Jun 25th 2018, 09:44 |
neon1024 |
What have I done wrong? I’m using `$this->getRequest()->allowMethod('post');` yet when I curl to my url, I get `HTTP/1.1 405 Method Not Allowed` |
# |
Jun 25th 2018, 09:42 |
josbeir |
maybe that solves your issue |
# |
Jun 25th 2018, 09:42 |
josbeir |
depending on what you are trying to do, check https://book.cakephp.org/3.0/en/orm/behaviors/timestamp.html |
# |
Jun 25th 2018, 09:41 |
unclezoot |
ill give it a go, cheers |
# |
Jun 25th 2018, 09:41 |
unclezoot |
thanks, i was hopeful id be able to pass something into the request data without having to play with query expressions |
# |
Jun 25th 2018, 09:38 |
josbeir |
=> https://book.cakephp.org/3.0/en/orm/query-builder.html#using-sql-functions |
# |
Jun 25th 2018, 09:37 |
josbeir |
'created' => $query->func()->now(), |
# |
Jun 25th 2018, 09:36 |
unclezoot |
morning, is it possible to save the value NOW()? i seem to remember there was a trick to it |
# |
Jun 25th 2018, 09:22 |
josbeir |
it should return a list of plugins from vendor/cakephp-plugins.php |
# |
Jun 25th 2018, 09:21 |
josbeir |
ok, so it looks that Configure::read('plugins') returns null in ConsoleIntegrationTestCase |
# |
Jun 25th 2018, 09:21 |
birdy247 |
@josbeir awesome, thanks |
# |
Jun 25th 2018, 09:04 |
josbeir |
calling $this->addPlugin will 'fall back' to old style plugin loading if Plugin.php is not found |
# |
Jun 25th 2018, 09:03 |
josbeir |
since 3.6.6 there is backwards compatibility |
# |
Jun 25th 2018, 09:02 |
birdy247 |
To load a plugin using the "new style", does that plugin have to have a Plugin.php file? |
# |
Jun 25th 2018, 09:00 |
birdy247 |
Is this essentially a bit like the Application.php |
# |
Jun 25th 2018, 09:00 |
birdy247 |
I notice there is a new Plugin.php file when I bake plugins now |
# |
Jun 25th 2018, 08:57 |
birdy247 |
@bogdan I can recomended the duplicate bhaviour |
# |
Jun 25th 2018, 08:56 |
birdy247 |
mormomg |
# |
Jun 25th 2018, 08:46 |
josbeir |
its because of the dynamic plugin loading stuff |
# |
Jun 25th 2018, 08:43 |
josbeir |
throwing a bunch of Cake\Core\Exception\MissingPluginException: |
# |
Jun 25th 2018, 08:42 |
josbeir |
in ConsoleIntegrationTestCase |
# |
Jun 25th 2018, 08:42 |
josbeir |
anyone having issues with 3.6.6 and Command tests that fail because of the new plugin loading fixes? |
# |
Jun 25th 2018, 08:27 |
tim |
`$newOrder` being an entity in this case |
# |
Jun 25th 2018, 08:27 |
tim |
@bogdan |
# |
Jun 25th 2018, 08:27 |
tim |
```$newOrder->isNew(true); $newOrder->unsetProperty('id');``` I think that's a way to do it with clone |
# |
Jun 25th 2018, 08:26 |
LubosR |
Tried to amend templates, but no luck so far |
# |
Jun 25th 2018, 08:26 |
LubosR |
Is there any way how to disable generated col-md-6 divs on the fly when align horizontal is set at friendsofcake/BootstrapUi form helper? |
# |
Jun 25th 2018, 08:20 |
chrisshick |
Due to my lack of sleep and because of my lack of sleep, I have answered my own question XD |
# |
Jun 25th 2018, 08:18 |
madbbb |
thank you @neon1024 |
# |
Jun 25th 2018, 08:17 |
neon1024 |
If you need associations as well |
# |
Jun 25th 2018, 08:17 |
neon1024 |
Or you could use the Duplicatable behaviour, https://github.com/riesenia/cakephp-duplicatable |
# |
Jun 25th 2018, 08:16 |
neon1024 |
Would be the other way I guess |
# |
Jun 25th 2018, 08:16 |
neon1024 |
`$entityArray = $entity->toArray(); unset($entityArray['id']); $newEntity = $this->Examples->newEntity($entityData);` |
# |
Jun 25th 2018, 08:15 |
neon1024 |
Yes |
# |
Jun 25th 2018, 08:15 |
madbbb |
but it will clone id field? |
# |
Jun 25th 2018, 08:15 |
chrisshick |
@bogdan |
# |
Jun 25th 2018, 08:15 |
chrisshick |
:point_up: |
# |
Jun 25th 2018, 08:14 |
neon1024 |
Use `clone` |
# |
Jun 25th 2018, 08:14 |
madbbb |
what is the simplest way to clone entity? |