有没有可能在运行时注册服务提供者,而不是在app.php提供者列表中预先注册?如果是,将如何完成?我可以从已经在app.php中运行的其他服务提供商那里注册它吗?
发布于 2017-04-06 02:52:37
通过调用ioc容器上的register方法,可以随时注册服务提供者……
使用外观:
App::register($yourProvider);使用帮助器:
app()->register($yourProvider);
https://stackoverflow.com/questions/43237247
复制相似问题