andersao / andersao/l5-repository
Is it possible to add repository without initialize at the controller constructor?
- Linguagem predominante
- PHP
- Estrelas
- 4.2k
- Forks
- 880
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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));
}
}
```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.