# |
Jul 5th 2019, 15:39 |
inoas |
however i wished there was just fromDatabase and toDatabase things in the entity I suppose to make things easier |
# |
Jul 5th 2019, 15:38 |
inoas |
now thats awesome |
# |
Jul 5th 2019, 15:38 |
inoas |
ndm oh there is a 2nd step where I can convert things |
# |
Jul 5th 2019, 15:30 |
ndm |
@scuadra `$date->format('m')` |
# |
Jul 5th 2019, 15:26 |
ndm |
@ionas Sounds like you're looking for a custom database type, see https://book.cakephp.org/3.0/en/orm/database-basics.html#adding-custom-types |
# |
Jul 5th 2019, 15:26 |
scuadra |
How can I get month from FrozenDate with leading zero |
# |
Jul 5th 2019, 15:11 |
inoas |
aka I want to have php arrays in cakephp world and json strings for the database? (yeah I know it is just for simple persistence trickery)? |
# |
Jul 5th 2019, 15:10 |
inoas |
is there a way to differentiate between marshalling for php memory and marshalling into an entity for saving to the database |
# |
Jul 5th 2019, 15:09 |
inoas |
hi |
# |
Jul 5th 2019, 15:02 |
rochasmarcelo |
Could you provide the full error with trace info? |
# |
Jul 5th 2019, 14:54 |
joey.mukherjee |
Yes |
# |
Jul 5th 2019, 14:52 |
rochasmarcelo |
Are you able to access /profile without changing routes.php? |
# |
Jul 5th 2019, 14:50 |
joey.mukherjee |
@rochasmarcelo, on the second "url", do you mean error? If so, its /admin/queue. I have `Router::prefix('admin', function ($routes) {...` in my routes.php as well. Probably should mention that. |
# |
Jul 5th 2019, 14:48 |
rochasmarcelo |
@joey.mukherjee which url do you get this url? |
# |
Jul 5th 2019, 14:45 |
joey.mukherjee |
I am using the Queue plugin and the CakeDC users plugin, but I can't navigate to /admin/queue without having ``` $routes->connect ('/profile', ['plugin' => 'CakeDC/Users', 'controller' => 'Users', 'action' => 'profile']); $routes->connect ('/logout', ['plugin' => 'CakeDC/Users', 'controller' => 'Users', 'action' => 'logout']);``` explicitly in my routes.php. If don't have that, I get an Missing Routes error. Why is that? |
# |
Jul 5th 2019, 14:26 |
josbeir |
add line in robots.txt => Disallow: / |
# |
Jul 5th 2019, 14:22 |
allan088 |
Hi, is there a way to prevent search bots from indexing websites that are still under development? I'm using CakePhp 3.7 |
# |
Jul 5th 2019, 14:03 |
ndm |
@kiwi_60 A behavior can unload itself via the table object that it is attached to, but you should probably avoid loading the behavior in a table where it would cause recursion in the first place. |
# |
Jul 5th 2019, 13:38 |
kiwi_60 |
Hello guys... How can I disable a behavior inside a behavior? I have a log behavior that it's logging itself, so "Maximum function nesting level of '256' reached, aborting!" |
# |
Jul 5th 2019, 12:46 |
ndm |
Same for `IS NOT` btw, it will be converted to `!=` |
# |
Jul 5th 2019, 12:45 |
madbbb |
@ndm hah. thank you |
# |
Jul 5th 2019, 12:45 |
ndm |
@madbbb Just the the `IS` variant, CakePHP will convert it to `=` in case the value is not `null`. |
# |
Jul 5th 2019, 12:41 |
slackebot |
<madbbb> |
# |
Jul 5th 2019, 12:40 |
rchavik |
ok |
# |
Jul 5th 2019, 12:35 |
admad |
you need to convert the dispatchfilter into a middleware |
# |
Jul 5th 2019, 12:25 |
charolastra |
how does baking differentiate between hasOne and hasMany? |
# |
Jul 5th 2019, 12:13 |
admad |
@rchavik so read the config file or db (depending upon where you are saving the settings) in Application/Plugin::boostrap() and load plugins accordingly |
# |
Jul 5th 2019, 12:11 |
rchavik |
@ndm croogo allows plugins, eg: Ckeditor to be enabled via the admin panel |
# |
Jul 5th 2019, 12:10 |
dereuromark |
I had similar issues loading a plugin dynamically :slightly_smiling_face: Without a core fix/improvement here I still have to use these hacks: https://github.com/dereuromark/cakephp-ide-helper/tree/master/src/Utility |
# |
Jul 5th 2019, 12:09 |
ndm |
@rchavik It's possible, via `\Cake\Core\Plugin::getCollection()->add()`, but chances are there might be a better way... why do you need to load it from a controller? |
# |
Jul 5th 2019, 12:06 |
rchavik |
any suggestion on how i can load a plugin from a controller action then? |
# |
Jul 5th 2019, 12:05 |
ndm |
@sjorgefabi If your app isn't already composer based, read https://book.cakephp.org/2.0/en/installation/advanced-installation.html#create-a-cakephp-project on how to use the composer autoloader alongside the CakePHP autoloader, and then just use the PhpOffice library code directly as shown in their docs. |
# |
Jul 5th 2019, 11:57 |
sjorgefabi |
@admad Yes, I had seen it, but it uses phpExcel, and apparently it is no longer maintained: https://github.com/PHPOffice/PHPExcel, where you suggest using phpspreadSheet: https://github.com/PHPOffice/PhpSpreadsheet |
# |
Jul 5th 2019, 11:51 |
admad |
@sjorgefabi https://github.com/dakota/CakeExcel/tree/v1.0.5 |
# |
Jul 5th 2019, 11:50 |
sjorgefabi |
this was what I did until importing, previously download the packete: *$ composer requires phpoffice/phpspreadsheet* then *$ composer install* |
# |
Jul 5th 2019, 11:45 |
sjorgefabi |
Hello everyone, I do a query, I do not know if someone else happened, I'm using version 2 of cake and I need a plugin or library to export data in excel, I'm trying to use: phpspreadsheet: https: //phpspreadsheet.readthedocs .io / en / latest /, and my problem is that I can not use the classes |
# |
Jul 5th 2019, 11:40 |
admad |
no |
# |
Jul 5th 2019, 11:39 |
rchavik |
is it possible to get Application instance from inside a controller? |
# |
Jul 5th 2019, 11:36 |
felix.robaglia |
What is the correct way to access sessions infos (username for exemple) in the view ? Like if I want to echo 'Hello, $user' in the home for example ? thanks ! :slightly_smiling_face: |
# |
Jul 5th 2019, 11:16 |
neothermic |
but seriously, a bug report might work better, especially if there's a way to define how phpstorm can parse the routes |
# |
Jul 5th 2019, 11:15 |
dereuromark |
haha i like that @neothermic |