Article From:https://segmentfault.com/q/1010000012139711
Question:

Using thinkphp5, we built two modules, the background admin and the foreground index.
Is there any way to turn off admin’s routing if only the front index module is routed?

Thank you

Answer 0:

You can specify a module for routing

return [
    '[index]'     => [
        'index' => ['index/index/index', ['method' => 'get']],
        '__miss__'  => 'index/base/miss',
    ],
];

Answer 1:

application The config.php path under the directory is closed, under the index module, manually adding the config.php configuration file, then setting the route to open, and defining the routing rules. (can be used for TP5 configuration rules)

Link of this Article: On thinkphp5 routing

Leave a Reply

Your email address will not be published. Required fields are marked *