習(xí)慣了在控制器方法參上注入任意依賴, 用了webman不行了, 作者能否將thinkphp的類映射加進(jìn)來(lái)? 好讓控制器方法參可以注入任意依賴. 如下代碼, 目前webman還是實(shí)現(xiàn)不了
<?php
namespace app\controller;
use support\Request;
use app\model\User;
class Index
{
public function index(Request $request, User $user)
{
return json($user->getList());
}
}
這個(gè)我發(fā)過(guò)pr了,支持get參數(shù)和對(duì)象注入
https://github.com/walkor/webman-framework/pull/42