아래 코드는 모든 것을 말해 할 수 있도록 데이터를 전달Laravel 4 : ... 서비스 제공자
당신은 서비스 제공자의 내부 클래스에 테스트 배열을 전달해야// routes.php
App::make('SimpleGeo',array('test')); <- passing array('test')
// SimpleGeoServiceProvider.php
public function register()
{
$this->app['SimpleGeo'] = $this->app->share(function($app)
{
return new SimpleGeo($what_goes_here);
});
}
// SimpleGeo.php
class SimpleGeo
{
protected $_test;
public function __construct($test) <- need array('test')
{
$this->_test = $test;
}
public function getTest()
{
return $this->_test;
}
}
안녕하십니까 @schmaltz 귀하의 질문에 대한 답변을 얻었습니까? 내 응용 프로그램이 당신과 비슷한 아키텍처를 사용하므로 같은 문제가 발생하여 솔루션을 찾고 있습니다. – Omranic