andersao / andersao/l5-repository
Is it possible to add repository without initialize at the controller constructor?
- 主要言語
- PHP
- スター
- 4.2k
- フォーク
- 880
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I would like to add Repository at the constructor of Casperlaitw\LaravelFbMessenger\DefaultHandler, but it throws the error. Any solution?
The binding between ChatbotBlockRepository and ChatbotBlockRepositoryEloquent is success, and it works in Normal Controller constructor.
``` php
Target [App\\Models\\Repositories\\ChatbotBlockRepository] is not instantiable while building [App\\Contracts\\ChatbotDefaultHandler].
```
``` php
blockRepo = $blockRepo;
}
/**
* handle method is required.
*/
public function handle(ReceiveMessage $message)
{
\Log::debug('Received Message: ', (array) $message);
$this->send(new Text($message->getSender(), "Default Handler: {$message->getMessage()}"));
//$this->send(new Text($message->getSender(), $action->message));
}
}
```
コントリビューションガイド
評価
この issue はまだ評価されていません。