提交 6b5e2e94 编写于 作者: Y yuenblue

aaa

上级 22919f7d
......@@ -4,7 +4,7 @@ declare (strict_types = 1);
namespace app;
use think\Service;
use think\facade\Event;
/**
* 应用服务类
*/
......@@ -14,6 +14,10 @@ class AppService extends Service
{
// 服务注册
// $this->app->bind()
Event::listen('UserLogin', function($user) {
print "????";
});
}
public function boot()
......
......@@ -2,6 +2,7 @@
namespace app\controller;
use app\BaseController;
use think\facade\Event;
use think\facade\Route;
class Index extends BaseController
......@@ -13,6 +14,7 @@ class Index extends BaseController
public function hello($name = 'ThinkPHP6')
{
Event::trigger("UserLogin","aaaa");
var_dump($this->request);
return Route::buildUrl('aaaa',['name'=>$name])->__toString();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册