Log message #4154524

# At Username Text
# Jun 28th 2018, 14:11 generitter I’m writing some test code to verify a route. I’m working in a plugin, the plugin has routes. Does anyone know how to load the routes in my config for the test? The Test results I’m extending Cake TestCase.
# Jun 28th 2018, 14:02 itmpls thx for the insight
# Jun 28th 2018, 14:02 josbeir doesn't seem that much work :slightly_smiling_face: you can do it!
# Jun 28th 2018, 14:01 itmpls yup i have the subdomain records in the db. i need to whitelist them in the middleware first
# Jun 28th 2018, 14:00 josbeir or store them in the db where you filter them by site/domain and inject them somewhere based on the current site
# Jun 28th 2018, 13:59 josbeir and load them in the middleware too
# Jun 28th 2018, 13:59 josbeir with my aproach i can store these routes in the site configuration object
# Jun 28th 2018, 13:58 josbeir but tbh if its just a few extra routes per sub/domain
# Jun 28th 2018, 13:58 itmpls yeah it doesn't seem like it would make sense for my approach :P
# Jun 28th 2018, 13:56 josbeir haven't needed dynamic routes at the moment @itmpls but i dont think i would aproach it like the plugin does
# Jun 28th 2018, 13:54 rbgcom When sharing a single app for many domains, is it possible cakephp have a separate cache for each?
# Jun 28th 2018, 13:54 itmpls to map with controllers
# Jun 28th 2018, 13:53 itmpls but how do you setup the dynamic routing part of it?
# Jun 28th 2018, 13:50 josbeir the configuration then holds specific settings for that site including the fetched site db record and stuff
# Jun 28th 2018, 13:50 josbeir if a domain is matched for a site a configuration is merged with the 'default' configuration
# Jun 28th 2018, 13:49 josbeir each site can have multiple domains
# Jun 28th 2018, 13:49 josbeir i have a 'site' configuration that is loaded with a domain as argument
# Jun 28th 2018, 13:48 josbeir i do it a little bit different
# Jun 28th 2018, 13:48 josbeir ah like that @itmpls
# Jun 28th 2018, 13:45 rbgcom ok
# Jun 28th 2018, 13:37 lorenzo rbgcom seems like the CaseExpression is not setup to accept a return type, can you open a ticket about it?
# Jun 28th 2018, 13:34 lorenzo the 3rd param is the type for the arguments, not the return value
# Jun 28th 2018, 13:21 rbgcom If using ORM case statement, why do values always return as strings even if type 'integer' is specified in the 3rd parameter of ->addCase()? An integer will return as '1' instead of 1. It appears the values are correct until :param1 is populated when the query is executed.
# Jun 28th 2018, 13:10 itmpls like in __invoke
# Jun 28th 2018, 13:10 itmpls https://github.com/multidimension-al/cakephp-subdomains/blob/master/src/Middleware/SubdomainMiddleware.php
# Jun 28th 2018, 13:09 josbeir but i don't get what you mean with 'prefix of the request'
# Jun 28th 2018, 13:09 itmpls for subdomains
# Jun 28th 2018, 13:09 josbeir indeed
# Jun 28th 2018, 13:09 itmpls i think awhile ago i mentioned https://github.com/multidimension-al/cakephp-subdomains and you said you setup something similar yourself
# Jun 28th 2018, 13:09 itmpls ah
# Jun 28th 2018, 13:08 josbeir the day is almost finished, i'm getting tired :)
# Jun 28th 2018, 13:08 josbeir what do you mean by prefix of the request?
# Jun 28th 2018, 13:07 itmpls hey @josbeir you had subdomain routing middleware setup, right? did you set the prefix of the request to the subdomain? and/or prepend the _host ?
# Jun 28th 2018, 12:20 lubos :+1:
# Jun 28th 2018, 12:20 josbeir so you can configure it if needed
# Jun 28th 2018, 12:20 josbeir make a component for it to keep your code dry
# Jun 28th 2018, 12:19 josbeir uhu :slightly_smiling_face:
# Jun 28th 2018, 12:19 lubos but try catch could work that's right :slightly_smiling_face:
# Jun 28th 2018, 12:19 lubos good idea, just tried to do it beforeRender so I have it for all actions
# Jun 28th 2018, 12:18 josbeir check out the app skeleton pagescontroller:display method
# Jun 28th 2018, 12:18 ondrej.nedvidek nasty LubosR !