Log message #4135089

# At Username Text
# Apr 25th 2018, 12:11 hmic just attach it when/where you want it to be
# Apr 25th 2018, 12:11 hmic eax: no!
# Apr 25th 2018, 12:11 eax That forces it to happen for all instances of the model being used though
# Apr 25th 2018, 12:10 lorenzo yeah
# Apr 25th 2018, 12:10 hmic lorenzo: i don't think it's neccessary to have crud have it itself, can be attached to the tables event as easy...
# Apr 25th 2018, 12:10 lorenzo you can also create you own action class, I often do that for more complex data transformations
# Apr 25th 2018, 12:09 lorenzo since in 3.6 you cannot alter the request
# Apr 25th 2018, 12:09 hmic but the beforemarshal should work fine, like lorenzo said
# Apr 25th 2018, 12:09 lorenzo maybe it should have a beforeMarshal too
# Apr 25th 2018, 12:09 lorenzo so it looks to be too late for you
# Apr 25th 2018, 12:09 lorenzo unfortunately the beforeSave event in crud already gives you an entity
# Apr 25th 2018, 12:08 hmic thats what events are for... crud has it's own events you can tap into
# Apr 25th 2018, 12:08 eax hmic: IIRC neither beforeFilter nor startup allows it, but lemme try to see if I’m remembering wrong! :)
# Apr 25th 2018, 12:08 hmic eax: set the event up in the controller you want it to be used from (only)?
# Apr 25th 2018, 12:07 eax lorenzo: Can I do it at controller level somehow? I have multiple different controllers that write to said Model, and I only need this for some of them :slightly_smiling_face:
# Apr 25th 2018, 12:06 hmic eax: has crud an event to let you manipulate data before it gets saved itself, maybe?
# Apr 25th 2018, 12:06 lorenzo the beforeMarshal event in the table
# Apr 25th 2018, 12:04 eax Hey folks! I am running CRUD on Cake 3.6.1, I have an add() method that is sent some data, that I want to manipulate before it’s made into an entity. What’s the best way to go about this? I could manipulate $this->request, but since that’s deprecated, that doesn’t seem like a proper solution :slightly_smiling_face:
# Apr 25th 2018, 10:15 neon1024 Morning everyone
# Apr 25th 2018, 08:34 joshualuckers If im correct, the default styles are set in cake.css
# Apr 25th 2018, 08:20 portilloster Morning guys, I have a problem that is a silly thing but has been anoying me for a while. I want to change the text color of the validation messages. When I inspect the element is pointing to a "scaffolding.less" file on my proyect that I cannot find. Any ideas how to solve this?
# Apr 25th 2018, 07:06 nisseni I'm having some problem with l18n - not sure if I'm in the wrong, but I'm getting Not unique table/alias: 'I18n__name' - shouldn't I be able to have "name" in several tables. Like product and category, and still make it work.
# Apr 25th 2018, 06:16 justrohu @admad - Thank you
# Apr 25th 2018, 06:01 bad5ect0r Haha
# Apr 25th 2018, 06:01 bad5ect0r -_- typos I swear...
# Apr 25th 2018, 06:01 bad5ect0r Let me try again
# Apr 25th 2018, 06:01 bad5ect0r Hmm
# Apr 25th 2018, 05:59 admad any file under webroot should be directly accessible with the default url rewriting rules
# Apr 25th 2018, 05:58 bad5ect0r t behaves like a normal directory?
# Apr 25th 2018, 05:58 bad5ect0r Hello! I think the problem I'm having is a simple one. Basically I have a subdirectory under the img directory (webroot/img/ProfilePictures), When I try to reference an image from here, I get a 404. I think CakePHP is trying to find a controller for it and that's why it's failing. I'm new to Cake, could someone please help me make it so that it jus
# Apr 25th 2018, 05:58 admad @justrohu https://github.com/cakephp/app/blob/master/config/bootstrap.php#L80 check something like server name / host name and conditional load a per environment file
# Apr 25th 2018, 05:57 ricksaccous generally i do it with different env files, or different config/app.php files
# Apr 25th 2018, 05:45 justrohu Hello All, How do I setup my database configuration env wise means a different db and credentails for production and different ones while in development and staging
# Apr 25th 2018, 02:24 itmpls because it sounded like you needed an api for your app to grab data from your cake app
# Apr 25th 2018, 02:23 itmpls or a website inside of a browser of a phone
# Apr 25th 2018, 02:23 itmpls are you talking about a real app
# Apr 25th 2018, 02:21 mendoza.anthony.g Yes, I agree, but how? I am using responsive to fit on all devices.
# Apr 25th 2018, 01:24 ricksaccous anything is possible
# Apr 25th 2018, 01:21 mendoza.anthony.g i dont know jow to explain it but all i want is an android app that will read my cakephp program, is it possible?
# Apr 25th 2018, 01:20 mendoza.anthony.g hi everyone
# Apr 24th 2018, 21:24 gareth___ Am I missing something?