【文件属性】:
文件名称:Startup:启动框架
文件大小:29KB
文件格式:ZIP
更新时间:2021-04-09 07:07:23
PHP
启动框架
您的MVC应用程序的启动程序框架。
要求:
PHP> = 8.0.3
BCMath PHP扩展
JSON PHP扩展
Mbstring PHP扩展
OpenSSL PHP扩展
PDO PHP扩展
作曲家> = 2.0.11
入门
配置路由器
可以在routes/web.php找到Web路由器。 您目前只能定义get和post路线。 路由器接受两个参数,即路径和回调。
加载一个名为about.php的视图:
$ app -> getRouter ()-> get ( '/about' , 'about' );
您可以使用闭包:
$ app -> getRouter ()-> get ( '/home' , function () {
return 'This is the home route.' ;
});
或将路由附加到控制器和方法:
$ app -> get
【文件预览】:
Startup-main
----composer.json(495B)
----config()
--------app.php(73B)
----migration.php(230B)
----database()
--------migrations()
----routes()
--------web.php(632B)
----.env-example(69B)
----LICENSE(1KB)
----app()
--------Models()
--------Helpers()
--------Controllers()
--------Middlewares()
--------Exceptions()
--------General()
--------Traits()
----views()
--------auth()
--------layouts()
--------home.php(129B)
--------_error.php(123B)
----.gitignore(32B)
----public()
--------index.php(470B)
----README.md(10KB)
----.gitattributes(66B)