如题。使用了较长时间symfony。该框架的控制器可以直接使用注释型路由,功能较全且使用方便。webman中不知是否可以引入该路由方法。
https://www.workerman.net/webman 有人下过插件,可以自己找下
找到了。是这个吧。https://github.com/webman-php/auto-route,但没有使用样例。
这个插件跟symfony中的annotation/route还是不一样。这个只是自动创建路由路径对吧。不能定义路由的一些参数。比如methods,参数类型requriements之类。
https://github.com/imlinfly/webman-annotation 这个才是我想要的。和symfony的注解路由同理念。
用下来,还是觉得不如symfony中的annotation/route好用。
https://www.workerman.net/webman
有人下过插件,可以自己找下
找到了。是这个吧。https://github.com/webman-php/auto-route,但没有使用样例。
这个插件跟symfony中的annotation/route还是不一样。这个只是自动创建路由路径对吧。不能定义路由的一些参数。比如methods,参数类型requriements之类。
[Route('/{id}', name: 'update', methods: ['PUT'], requirements: ['id' => '\d+'])]
https://github.com/imlinfly/webman-annotation 这个才是我想要的。和symfony的注解路由同理念。
用下来,还是觉得不如symfony中的annotation/route好用。