ThinkPHP8多应用构建

技能 · 02-29 · 684 人浏览
ThinkPHP8多应用构建

ThinkPHP8 默认单应用模式,需要安装多应用扩展

composer require topthink/think-multi-app

然后在根目录生成所需要的应用模块

php think build ms
php think build cli

上面两行命令会在app目录下生成配套的目录和文件
screenshot-20240229-170212.png

复制根目录的route目录至应用目录下,并删除根目录下的route目录
2024-02-29T09:03:53.png

路由直接指定控制器/方法
screenshot-20240229-170513.png

域名后面必须带应用名,否则无法访问(真的很想吐槽,去掉的方法只有一个,就是为应用单独绑定域名)
2024-02-29T09:06:17.png

ThinkPHP8 多应用 多模块 TP8
取消回复
  1. Hi there,

    My name is Mike from Monkey Digital,

    Allow me to present to you a lifetime revenue opportunity of 35%
    That's right, you can earn 35% of every order made by your affiliate for life.

    Simply register with us, generate your affiliate links, and incorporate them on your website, and you are done. It takes only 5 minutes to set up everything, and the payouts are sent each month.

    Click here to enroll with us today:
    https://www.monkeydigital.org/affiliate-dashboard/

    Think about it,
    Every website owner requires the use of search engine optimization (SEO) for their website. This endeavor holds significant potential for both parties involved.

    Thanks and regards
    Mike Miers

    Monkey Digital

  2. Hi there

    Just checked your dimm.cc baclink profile, I noticed a moderate percentage of toxic links pointing to your website

    We will investigate each link for its toxicity and perform a professional clean up for you free of charge.

    Start recovering your ranks today:
    https://www.hilkom-digital.de/professional-linksprofile-clean-up-service/

    Regards
    Mike Samuels
    Hilkom Digital SEO Experts
    https://www.hilkom-digital.de/

  3. 1 03-07

    学习

Theme Jasmine by Kent Liao