보호 된 $ companyID를 만들었습니다. 내 작업 클래스에 다음 __construct
기능에 나는 $id
을 통과하지만 난에서 변수를 초기화 할 때 내 handler function
그 다음Laravel 작업의 생성자에서 전달한 변수를 인스턴스화하는 방법
protected $companyID = NULL;
public function __construct($ID) {
$this->companyID = $ID;
}
null
클래스를 인스턴스화?
$ProcessOutgoingSMS = new ProcessOutgoingSMS();
$ProcessOutgoingSMS->dispatch(3);
을 주입 어떤 I가 액세스 할 수있는 핸들() 함수에
처럼 보인다 link https://laracasts.com/discuss/channels/general-discussion/how-do-you-pass-constructor-parameters-when-youre-instantiating-an-interface-through-a-bind –