在laravel文件中看到綁定容器的說法,在provider裡這樣綁定了之後具體是怎麼實現的,能不能給舉個例子詳細說明一下
$this->app->bind('HelpSpot\API', function ($app) { return new HelpSpot\API($app->make('HttpClient')); });
认证0级讲师
https://laravel.com/docs/5.4/...
直接resolve('HelpSpotAPI')
resolve('HelpSpotAPI')
https://laravel.com/docs/5.4/...
直接
resolve('HelpSpotAPI')