Log message #4154811

# At Username Text
# Jun 29th 2018, 15:35 mdunham jose
# Jun 29th 2018, 15:30 josbeir i guess i'll give it a go
# Jun 29th 2018, 15:30 josbeir i know i know i read up on the basics
# Jun 29th 2018, 15:29 admad Well then educate yourself :slightly_smiling_face:
# Jun 29th 2018, 15:28 josbeir :)
# Jun 29th 2018, 15:28 josbeir always hesistant for production use with plugins i dont know much about
# Jun 29th 2018, 15:27 admad @josbeir I do :slightly_smiling_face:
# Jun 29th 2018, 15:17 itmpls 'plugin' => 'Companies', 'controller' => 'Companies', 'action' => 'index', 'prefix' => 'subdomain' should this not map to plugins/Companies/src/Controller/CompaniesController.php with namespace Companies\Controller; use Companies\Controller\AppController; class CompaniesController extends AppController { public function index(); }
# Jun 29th 2018, 15:12 josbeir i'm deciding on using the crud plugin or not, you guys all using it ?
# Jun 29th 2018, 15:01 itmpls :slightly_smiling_face:
# Jun 29th 2018, 15:01 itmpls good morning
# Jun 29th 2018, 14:46 mdunham good morning
# Jun 29th 2018, 14:26 jhob all sorted now, used a collection - thanks for the help
# Jun 29th 2018, 13:57 josbeir if you have a route that needs to be reachable from more then 1 host you can also load these in your middleware or something
# Jun 29th 2018, 13:56 itmpls k
# Jun 29th 2018, 13:56 itmpls yeah I don't need dynamic routes really
# Jun 29th 2018, 13:55 josbeir but if you dont need dynamic routes but some hardcoded routes specifically for 1 domain you can use the _host param
# Jun 29th 2018, 13:55 josbeir 'dynamic' routes can be added in your middleware
# Jun 29th 2018, 13:55 josbeir normal shared routes can be defined in your routes.php file, no need to add _host etc, they will just work on all domains
# Jun 29th 2018, 13:54 itmpls for example, nebraska.domain.com, miami.domain.com .. same template/theme, just different subdomain
# Jun 29th 2018, 13:54 itmpls they'll be using the same template/theme, i dont need custom routes for each section
# Jun 29th 2018, 13:54 itmpls it'll probably just be within 1 plugin
# Jun 29th 2018, 13:53 itmpls oh and the routes.. haven't configured that yet
# Jun 29th 2018, 13:53 itmpls there's 1 primary domain but many subdomains
# Jun 29th 2018, 13:53 itmpls and i'm already validating them in the middleware
# Jun 29th 2018, 13:53 josbeir and the routes for that domain ?
# Jun 29th 2018, 13:53 itmpls yeah, the subdomains are stored in a table
# Jun 29th 2018, 13:53 josbeir you have your domain specific routes stored in a db right?
# Jun 29th 2018, 13:52 josbeir there are a few ways
# Jun 29th 2018, 13:51 josbeir check out the routing middleware
# Jun 29th 2018, 13:51 itmpls you mean not in config/routes?
# Jun 29th 2018, 13:50 itmpls i'm just not understanding how i'd "load up routes for that site dynamically" though - haven't messed much with custom routes or middleware in cake
# Jun 29th 2018, 13:50 josbeir :)
# Jun 29th 2018, 13:49 lorenzo @josbeir brave guy
# Jun 29th 2018, 13:48 josbeir if you load then from a db its not needed
# Jun 29th 2018, 13:48 josbeir the host param seems more of af hardcoded solution
# Jun 29th 2018, 13:48 josbeir if a site is detected in your middleware, load up routes for that site dynamically, no host needed then
# Jun 29th 2018, 13:47 josbeir @itmpls i would just pass in the matched hostname in your dynamtic routes like we talked before
# Jun 29th 2018, 13:46 josbeir :,(
# Jun 29th 2018, 13:45 josbeir i'm clearing the path for you by 1 year @lorenzo
# Jun 29th 2018, 13:44 itmpls i.e. Router::scope('/', ['_host' > '*.domain.com'], function($routes) { $routes->connect('/', [], 'routeClass' => 'foo' ] ) } ); vs Router::scope('/', ['prefix' => $prefix], function($routes) { $routes->fallbacks('Subdomain.Route'); } );