Logs for #cakephp

Page 2 of 36,479, showing 100 records out of 3,647,860 total, starting on record 101, ending on 200

# At Username Text
# Today, 09:23 andre.karner already done
# Today, 09:19 javier.villanueva In your app.php you must configure: ```'defaultLocale' => env('APP_DEFAULT_LOCALE', 'de-DE'),```
# Today, 09:11 andre.karner hey guys! someone know how to force specific datetime format? I've set the locale of Date / Time to "de-DE" but validation always says that the provided value is invalid. MySQL needs YYYY-MM-dd but I let my users provide the value in following format: dd.MM.yyyy - do I have to cast this manually?
# Today, 07:30 alexdd55976 morning
# Today, 06:46 javier.villanueva morning al
# Today, 00:03 latenal Hi there! How to require associated tables validation? I have the following code: ``` $entity = $this->Users->newEmptyEntity(); $entity->setAccess('username', true); $entity->setAccess('password', true); $entity = $this->Users->patchEntity($entity, $data, [ 'validate' => 'register', 'associated' => [ 'Companies' => [ 'validate' => 'register'
# Today, 00:03 slackebot ] ], ]);``` If I don’t pass company variables, it passes. Although I have `requirePresence` in the `CompaniesTable`.
# Yesterday, 22:36 challgren Here @luizcmarin https://github.com/challgren/luiz-martin-example
# Yesterday, 22:33 Jaime hi guys
# Yesterday, 21:21 challgren Standby
# Yesterday, 21:18 luizcmarin should i create locally? https://github.com/UseMuffin/Sti/blob/master/tests/Fixture/CooksFixture.php
# Yesterday, 21:17 luizcmarin @challgren I really don't understand the basics yet, because it's all different from my knowledge. But I'm struggling to learn. At this point, I thank you for your patience and effort.
# Yesterday, 21:11 luizcmarin @admad I used ctrl + H to speed up the changes. But I will pay attention to what you said.
# Yesterday, 21:08 challgren I dont want to fully make his solution because then he wont understand the basics
# Yesterday, 21:08 challgren Yeah I saw that, thats why I figured a walkthru might be better
# Yesterday, 21:07 admad for starters he's using `$this->cooks` everywhere instead of `$this->Cooks` for referring to the model in his updated gist
# Yesterday, 21:05 challgren https://github.com/UseMuffin/Sti/blob/master/tests/Fixture/CooksFixture.php this is our database
# Yesterday, 21:05 challgren Ok lets walk through this then
# Yesterday, 20:52 luizcmarin DONE. I removed some codes and comments for easier reading. Whatever you need, and what's best for you, ask me to do it here
# Yesterday, 20:33 luizcmarin _"I dont speak whatever language you speak"_ nobody is perfect :D
# Yesterday, 20:30 luizcmarin I agree. I'll fix
# Yesterday, 20:12 challgren https://github.com/UseMuffin/Sti/tree/master/tests/test_app/Model
# Yesterday, 20:12 challgren That way its a common language and knowledge between both of us
# Yesterday, 20:11 challgren @luizcmarin I dont speak whatever language you speak so I would prefer if we looked at the test cases and use the terms Cooks, Chefs, and AssistantChefs
# Yesterday, 19:43 luizcmarin @challgren https://gist.github.com/LuizMarin/f92b5ab916e7a7cb3e6b61f3a73c9152
# Yesterday, 16:33 m_mck Or did I miss some marvelous way of actually getting what I want via a plugin? (and then each integration = plugin=
# Yesterday, 16:32 m_mck How would you approach it? Logically it's a `Settings` controller that keeps all kinds of setup values - and then come integrations - and then there can be a ton of them.
# Yesterday, 16:32 m_mck Hello. I am trying to find a method that I could use in the long run and that would allow me to thin the controller (by for example "splitting it"). I have tried looking into plugins, although sadly I do rely on some of the models from the original apps (which is the "wrong type" of coupling in this case).
# Yesterday, 16:17 thomas078 ```location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { root /usr/share/nginx/html/webroot/; expires max; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; }``` When i set this. it will not load images
# Yesterday, 16:16 thomas078 having some problem with cakephp glide images with nginx cache expire.
# Yesterday, 12:43 challgren To fix it manually for the time being after you bake the migration_diff/snapshot just run bin/cake migrations mark_migrated
# Yesterday, 12:40 cakephp-slack @challgren thanks for opening an issue
# Yesterday, 12:38 challgren @cakephp-slack https://github.com/cakephp/bake/issues/638
# Yesterday, 11:21 challgren I'm going to be starting a new 4 project here in a bit and I'll see if it happens to me
# Yesterday, 11:12 challgren I’d probably open an issue at https://github.com/cakephp/migrations/issues
# Yesterday, 09:00 gianmarxgagliardi morning all
# Yesterday, 00:45 challgren Can you put your table so we have a complete gist
# Yesterday, 00:22 luizcmarin update, pardon
# Yesterday, 00:19 challgren Im not seeing your controller at all you have a file named controller but its a table
# Yesterday, 00:14 luizcmarin https://gist.github.com/LuizMarin/9c7c9ede4251a3c8f96ddc645255e585
# Yesterday, 00:13 challgren And access is via $this->StiCaixas
# Yesterday, 00:12 challgren You just need to set the $modelClass as the STI table
# Yesterday, 00:12 challgren You can name the controller whatever you want
# Yesterday, 00:12 luizcmarin or CaixaController ?
# Yesterday, 00:11 luizcmarin @challgren StiCaixaController? (it's real table)
# Jan 25th, 23:38 challgren By default Cake is autoloading Caixa based on the controller name so you need to override the `$modelClass = 'StiCaixas';` in your controller
# Jan 25th, 23:33 slackebot Command sent from Slack by challgren:
# Jan 25th, 23:33 slackebot !gist
# Jan 25th, 23:33 challgren Do a gist of your controller I'll show you. Do it on GitHub so I can fork it
# Jan 25th, 23:33 challgren It's the same as $this-loadModel() in your controller
# Jan 25th, 23:31 challgren Ok override the $modelClass in your controller with the sticaixa table class name
# Jan 25th, 23:20 luizcmarin @challgren you understood well. So far I believe I have done everything right. But from there ..... I create a CaixaController, ContasPagarController, ContasReceberController? I created a CaixaController. He says' it doesn't exist in the database ". And it doesn't, he is right. I did not find HOW to make the menus and the screens. It is this side that I read all the material you gave me and tried to get the logic, ... but the cook here
# Jan 25th, 23:20 slackebot burned everything ... Then I started again from the beginning. It was then that I became convinced that this kind of thing cannot be done without real cooks. _* Realize that I don't write asking anything without making several attempts beforehand. I've dealt with support a lot and I know how stressful it is._
# Jan 25th, 21:58 challgren @cakephp-slack does your /bin/cake.php match https://github.com/cakephp/app/tree/master/bin/cake.php?
# Jan 25th, 21:49 challgren Those types being Caixa, Caixapagar, Caixareceber, stored in the type column of your sti_caixas table in mySQL
# Jan 25th, 21:47 challgren @luizcmarin from my understanding you want to have 1 table with 3 different “types” stored? Those types are then converted by the ORM into Entities that are different? Is that correct?
# Jan 25th, 21:32 luizcmarin STI....
# Jan 25th, 21:05 latenal Hi! I am trying to integrate a JWT authentication using the `Authentication` plugin. I read the docs and I don’t quite understand how it works. ``` public function login() { $this->request->allowMethod(['get', 'post']); $result = $this->Authentication->getResult(); if (!$result->isValid()) { throw new ForbiddenException(__('The username and password don\'t match.')); } }```
# Jan 25th, 20:17 luizcmarin @challgren Excuse me. I started the STI all over again. It is impossible to continue alone without overloading the support. Difficult to implement with readme.md and does not explain how to continue. I tried every dumb way I know. I will think of alternatives.
# Jan 25th, 12:30 alexdd55976 its cake 3.6
# Jan 25th, 12:29 alexdd55976 `NOT IN`??
# Jan 25th, 12:29 alexdd55976 am i wrong with the statement?
# Jan 25th, 12:29 alexdd55976 there are tracking_ids in the variable.
# Jan 25th, 12:27 alexdd55976 but get this `Impossible to generate condition with empty list of values for field (tracking_id)`v
# Jan 25th, 12:27 alexdd55976 trying to do this ```$Times->deleteAll([ 'Times.model_id' => 7, 'Times.model_primary_key' => $entity->id, 'Times.tracking_id NOT IN' => $tracking_ids ]);```
# Jan 25th, 12:27 alexdd55976 hey fellows
# Jan 25th, 10:24 challgren @luizcmarin we updated the README.md to include setTable instead of table. Also you may want to be looking at https://github.com/UseMuffin/Sti/tree/cake-4.x as thats more specific to Cake 4 and the master branch is for 3.6+
# Jan 25th, 00:27 luizcmarin very complex, I am confused and tired. Tomorrow I try to start again. The plugin is good, congratulations to those who did it. But my knowledge and ability to understand are greatly reduced. Thanks for the help @challgren. Willing people like you and some of the support is what dignifies the "kitchen of the cake". Good evening.
# Jan 24th, 23:44 luizcmarin examinando
# Jan 24th, 23:43 challgren The tests show you how to use it in a more technical sense and what to expect
# Jan 24th, 23:39 luizcmarin mamma mia.... moment, muuuch moments :tired_face:
# Jan 24th, 23:33 challgren https://github.com/UseMuffin/Sti/blob/master/tests/TestCase/Model/Behavior/StiBehaviorTest.php#L36
# Jan 24th, 23:33 challgren https://github.com/UseMuffin/Sti/blob/master/tests/test_app/Model/Table/CooksTable.php
# Jan 24th, 23:32 challgren https://github.com/UseMuffin/Sti/blob/master/tests/TestCase/Model/Behavior/StiBehaviorTest.php#L46
# Jan 24th, 23:30 challgren Yes, you just need to use the sti_caixas table to do your queries. The find/get will return the corrected entity type
# Jan 24th, 23:29 luizcmarin but can i create a menu for each type? and the screens too?
# Jan 24th, 23:28 challgren You wont have tables called caixa, caixapagar, and caixareceber. Those are entities. The sti_caixas table is what holds your data
# Jan 24th, 23:27 luizcmarin now i'm really confused. Give me time to understand your concept and test it out.
# Jan 24th, 23:24 challgren and add conditions => [‘type’ => ‘caixa’] to your paginate
# Jan 24th, 23:23 challgren Yes so you need to change your $modelClass in your controller to be StiCaixas
# Jan 24th, 23:23 luizcmarin it's in StiCaixasTable: _public_ _function_ _initialize_(_array_ _$config_)_:_ _void_     {         _parent::initialize_(_$config_);         _$this->setTable_('sti_caixas');         _$this->setDisplayField_('id');         _$this->setPrimaryKey_('id');         _// sti_          _$this->addBehavior_('Muffin/Sti.Sti', [             'typeMap' _=>_ [          
# Jan 24th, 23:23 slackebot       'caixa' _=>_ 'App\Model\Entity\Caixa',                 'caixapagar' _=>_ 'App\Model\Entity\CaixaPagar',                 'caixareceber' _=>_ 'App\Model\Entity\CaixaReceber',             ]         ]);         _$this->setEntityClass_('App\Model\Entity\Caixa'); _// default_
# Jan 24th, 23:22 challgren You need to use the StiTable you attached the behavior to
# Jan 24th, 23:21 luizcmarin _public_ _function_ _index_()     {         _$this->paginate_ _=_ [             'contain' _=>_ ['Pessoas', 'PlanoContas', 'Pedidos'],         ];         _$Caixas_ _=_ _$this->paginate_(_$this->Caixas_);         _$this->set_(compact('Caixas'));     }
# Jan 24th, 23:21 luizcmarin I created CaixasController.
# Jan 24th, 23:20 challgren Ok so your reading data, whats that call to read the data?
# Jan 24th, 23:16 luizcmarin when I try to access http: // localhost: 8765 / caixas
# Jan 24th, 23:15 challgren What is causing the error are you trying to save, trying to read?
# Jan 24th, 23:14 slackebot " Shouldn't he go to sti_caixas?
# Jan 24th, 23:14 luizcmarin excuse me. I was writing the situation. $this->setTable('sti_caixas'); ------> THIS TABLE IS REAL $this->setDisplayField('id'); $this->setPrimaryKey('id'); // sti $this->addBehavior('Muffin/Sti.Sti', [ 'typeMap' => [ 'caixa' => 'App\Model\Entity\Caixa', ------> THIS TABLE IS NOT REAL 'caixapagar' => 'App\Model\Entity\CaixaPagar',
# Jan 24th, 23:14 slackebot ------> THIS TABLE IS NOT REAL 'caixareceber' => 'App\Model\Entity\CaixaReceber', ------> THIS TABLE IS NOT REAL ] ]); $this->setEntityClass('App\Model\Entity\Caixa'); // default I created the entities box, box, box and box. I created the add, edit, view, index screens. However, I get the following error: " SQLSTATE [42S02]: Base table or view not found: 1146 Table 'ola_ney.caixas' doesn't exist
# Jan 24th, 23:12 challgren @luizcmarin please stop saying it has errors and not including what the error thats not very conductive to figuring out your issue.
# Jan 24th, 23:11 cakephp-slack I’m having an issue with migrations in a fresh CakePHP 4 install: ```$ bin/cake bake migration_snapshot Initial Creating file /home/vagrant/code/config/Migrations/20200124230841_Initial.php Wrote `/home/vagrant/code/config/Migrations/20200124230841_Initial.php` Marking the migration 20200124230841_Initial as migrated... Exception: Shell class for "Migrations" could not be found. If you are trying to use a plugin shell, that was
# Jan 24th, 23:11 slackebot loaded via $this->addPlugin(), you may need to update bin/cake.php to match https://github.com/cakephp/app/tree/master/bin/cake.php In [/home/vagrant/code/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php, line 332]``` The migrations seems to be created successfully but marking it as done generates an error.
# Jan 24th, 22:58 luizcmarin I followed all the guidelines of the STI. At least, I believe so. But I have doubts because of some errors
# Jan 24th, 22:56 luizcmarin @challgren disponible?
# Jan 24th, 21:43 wnasich @challgren thanks!
# Jan 24th, 21:42 challgren https://github.com/burzum/cakephp-service-layer might be useful to you @wnasich you might need to update it for cake4
# Jan 24th, 21:42 wnasich ops, thanks!
# Jan 24th, 21:32 kiwi_74 @wnasich Thanks. That's what I was looking for :)