Go to file
Unshift 35124d751f
continuous-integration/drone/push Build is passing Details
fix: test14
2024-11-22 18:03:39 +08:00
.github/workflows feat: 1 2023-08-26 15:12:40 +08:00
app fix: 前端登陆 请求后端hyperf 正常 2023-09-01 16:37:06 +08:00
bin feat: 1 2023-08-26 15:12:40 +08:00
config fix: 前端登陆 请求后端hyperf 正常 2023-09-01 16:37:06 +08:00
docker fix: test 2024-11-21 18:21:57 +08:00
routes fix: 前端登陆 请求后端hyperf 正常 2023-09-01 16:37:06 +08:00
storage/languages fix: 前端登陆 请求后端hyperf 正常 2023-09-01 16:37:06 +08:00
test feat: 1 2023-08-26 15:12:40 +08:00
.drone-非docker.yml fix: YML 2023-08-29 13:04:30 +08:00
.drone.yml fix: test14 2024-11-22 18:03:39 +08:00
.drone2.yml fix: test13 2024-11-22 10:55:15 +08:00
.drone3.yml fix: test 2024-11-21 18:21:57 +08:00
.env fix: test 2024-11-21 18:21:57 +08:00
.env.example fix: 修改端口 2023-09-04 14:25:25 +08:00
.gitignore fix: git 2023-09-04 14:28:01 +08:00
.gitlab-ci.yml feat: 1 2023-08-26 15:12:40 +08:00
.php-cs-fixer.php feat: 1 2023-08-26 15:12:40 +08:00
.phpstorm.meta.php feat: 1 2023-08-26 15:12:40 +08:00
Dockerfile-test fix: YML 2023-08-29 17:07:21 +08:00
Dockerfile22 fix: YML 2023-08-28 16:31:26 +08:00
Functions.php fix: 前端登陆 请求后端hyperf 正常 2023-09-01 16:37:06 +08:00
README.md fix: 前端登陆 请求后端hyperf 正常 2023-09-01 16:37:06 +08:00
composer.json fix: 前端登陆 请求后端hyperf 正常 2023-09-01 16:37:06 +08:00
deploy.test.yml feat: 1 2023-08-26 15:12:40 +08:00
phpstan.neon feat: 1 2023-08-26 15:12:40 +08:00
phpunit.xml feat: 1 2023-08-26 15:12:40 +08:00

README.md

Build Status

全局中间件 app/config/middleware 中配置跨域中间价和验证器中间价

http 对应 config/autoload/server.php 内每个 server 的 name 属性对应的值,该配置仅应用在该 Server 中

生成中间件 php ./bin/hyperf.php gen:middleware Auth/FooMiddleware 【Auth = 文件夹名称-可以不带 默默人会生成在 app下的Middleware

文件夹中,若没有自动创建 /FooMiddleware = 中间价名称】

composer dumpautoload 执行加载

所有的 都需要使用命令执行一遍 后期再复制相同的东西 就可以被注册器发现了 【 request middleware 这些】 使用方法: https://hyperf.wiki/3.0/#/zh-cn/validation

php bin/hyperf.php gen:model menu --pool default --with-comments 生成模型

Introduction

This is a skeleton application using the Hyperf framework. This application is meant to be used as a starting place for those looking to get their feet wet with Hyperf Framework.

Requirements

Hyperf has some requirements for the system environment, it can only run under Linux and Mac environment, but due to the development of Docker virtualization technology, Docker for Windows can also be used as the running environment under Windows.

The various versions of Dockerfile have been prepared for you in the hyperf/hyperf-docker project, or directly based on the already built hyperf/hyperf Image to run.

When you don't want to use Docker as the basis for your running environment, you need to make sure that your operating environment meets the following requirements:

  • PHP >= 7.3
  • Swoole PHP extension >= 4.5and Disabled Short Name
  • OpenSSL PHP extension
  • JSON PHP extension
  • PDO PHP extension If you need to use MySQL Client
  • Redis PHP extension If you need to use Redis Client
  • Protobuf PHP extension If you need to use gRPC Server of Client

Installation using Composer

The easiest way to create a new Hyperf project is to use Composer. If you don't have it already installed, then please install as per the documentation.

To create your new Hyperf project:

$ composer create-project hyperf/hyperf-skeleton path/to/install

Once installed, you can run the server immediately using the command below.

$ cd path/to/install $ php bin/hyperf.php start

This will start the cli-server on port 9501, and bind it to all network interfaces. You can then visit the site at http://localhost:9501/

which will bring up Hyperf default home page.