I am getting error:
GitHubApp::__construct() must be an instance of App\Project\Repositories\GitProviderRepository
I thought Laravel does some kind of magic when it come to __construct()
so i don't have to inject it into new GitHubApp();
?
use App\Project\Repositories\GitProviderRepository;
class GitHubApp
{
private $gitProviderRepository;
public function __construct(GitProviderRepository $gitProviderRepository)
{
$this->gitProviderRepository = $gitProviderRepository;
}
}
In other class:
return new GitHubApp();