How to reuse a Dusk test browser instance?

北慕城南 提交于 2019-12-05 02:26:13
Abdalla Hisham

Quoting from laravel docs:

Sometimes, you may wish to bind something into the container that should only be resolved once, and the same instance should be returned on subsequent calls into the container:

$this->app->singleton('FooBar', function($app)
{
    return new FooBar($app['SomethingElse']);
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!