Open vmussato opened 7 years ago
I feel your pain @vmussato I'm having the same error, saw threads under the video itself and in laracasts forums.
@JeffreyWay would you be so kind to look at this issue? )
I found your post when I was looking for a solution. The problem for me was that somehow that those lines on my bootstrap file:
return new QueryBuilder(
Connection::make()
);
Did not work!
Try to replace for that:
$query = new QueryBuilder(
Connection::make()
);
I have been uploading this repository where you can find all solutions that are currently working. (21/03/2020).
Just bear in mind that I have named and written down some lines slightly different in order to make more understandable to me.
It will probably fix, I hope so.
Hey @JeffreyWay,
I think you might be able to close this issue now.
Apart from that, thanks for your such a great content on Laracasts :)
In this class QueryBuilder.php
public function __contruct($pdo) { $this->pdo = $pdo; }
The method name is __construct not contruct. this is a spelling mistake
Hi, i think i followed the code along correctly, but i keep getting this error
It seems to be some problem related to my pdo object, it was working fine until the refactoring, but in some point it stopped working.
Heres my code
index.php
bootstrap.php
Connection.php
and QueryBuilder.php
Any idea? I suspect the error is coming from Connection.php generating a messed up pdo and the QueryBuilder is launching an error when it tries to create the $statement.