阅读(1835)
赞(3)
Laravel 8 绑定实例
2021-06-23 10:30:36 更新
你也可以使用 instance 方法将现有对象实例绑定到容器中。给定的实例会始终在随后的调用中返回到容器中:
$api = new \HelpSpot\API(new HttpClient);
$this->app->instance('HelpSpot\API', $api);你也可以使用 instance 方法将现有对象实例绑定到容器中。给定的实例会始终在随后的调用中返回到容器中:
$api = new \HelpSpot\API(new HttpClient);
$this->app->instance('HelpSpot\API', $api);Copyright©2023 字节宝字节宝| |
违法和不良信息举报电话:|举报邮箱:3111859717@qq.com
