tp6 多模塊多應用路由


php think make:controller mpos@admin/v1/Blog --plain
應用名@一層目錄/二層目錄/控制器名稱

路由

Route::get("test2","admin.v1.Blog/test2");

image

驗證器

php think make:validate mpos@api/User

多應用下中間件生成命令

php think make:middleware dianqian@AllowCrossDomain

image

創建模型命令

php think make:model mpos@admin/v1/Company //應用名@文件1/文件2/模型名稱

查看命令

php think

make
  make:command      Create a new command class
  make:controller   Create a new resource controller class
  make:event        Create a new event class
  make:listener     Create a new listener class
  make:middleware   Create a new middleware class
  make:model        Create a new model class
  make:service      Create a new Service class
  make:subscribe    Create a new subscribe class
  make:validate     Create a validate class
 optimize
  optimize:route    Build app route cache.
  optimize:schema   Build database schema cache.
 route
  route:list        show route list.
 service
  service:discover  Discover Services for ThinkPHP
 vendor
  vendor:publish    Publish any publishable assets from vendor packages

服務文件

php think make:service lanpos@admin/v1/TestService

php think make:controller index@admin/v1/LoginController
Controller:app\index\controller\admin\v1\LoginController created successfully.
php think make:controller admin/v1/LoginController
Controller:app\controller\admin\v1\LoginController created successfully.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM