1
를 찾을 수 없습니다 얻을 내가 PARAM 폼 ENV를 보낼 수있는 내 자신의 ServiceProvider를 만들 때 개시 클래스 :방법이
class InstagramServiceProvider extends ServiceProvider
{
protected $defer = true;
public function boot()
{
$this->publishes([
__DIR__.'/../config/config.php' => config_path('instagram.php'),
]);
}
public function register()
{
$this->app->bind('instagram.client', function ($app) {
return new InstagramClient([
'apiKey' => $app['config']->get('instagram.clientId'),
'apiSecret' => $app['config']->get('instagram.clientSecret'),
'apiCallback' => $app['config']->get('instagram.redirectUri'),
'scope' => $app['config']->get('instagram.scope'),
]);
});
}
public function provides()
{
return array('instagram.client');
}
}
내가 설정에서 데이터를 얻을 수 없다? 내가 뭘 잘못 했니?
또한'$ 응용 프로그램의 [ '을 사용할 수 있습니다 다음과 같이 사용할 수 있습니다 config '] ['instagram '] ['clientId ']'등 – Neat
아, 위대한 분! 나는 그것을 추가 할 것이다. :-) –