laravel 5错误 Argument 2 passed to Illuminate\Database\Query\Builder::__construct() must be。。。

我在登录 localhost/auth/login 来验证mongodb是否与laravel连接并能使用,结果出现如下错误 请问问大神么是怎么回事:
ErrorException in Builder.php line 198:

Argument 2 passed to Illuminate\Database\Query\Builder::__construct() must be an instance of Illuminate\Database\Query\Grammars\Grammar, null given, called in D:\development\environment\wamp\apache\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php on line 1899 and defined

in Builder.php line 198
at HandleExceptions->handleError('4096', 'Argument 2 passed to Illuminate\Database\Query\Builder::__construct() must be an instance of Illuminate\Database\Query\Grammars\Grammar, null given, called in D:\development\environment\wamp\apache\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php on line 1899 and defined', 'D:\development\environment\wamp\apache\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php', '198', array('connection' => object(Connection))) in Builder.php line 198
at Builder->__construct(object(Connection), null, object(Processor)) in Model.php line 1899
at Model->newBaseQueryBuilder() in Model.php line 1836
at Model->newQueryWithoutScopes() in Model.php line 1810
at Model->newQuery() in EloquentUserProvider.php line 89
at EloquentUserProvider->retrieveByCredentials(array('email' => '1212desd@qq.com', 'password' => 'adfdsaf')) in Guard.php line 359
at Guard->attempt(array('email' => '1212desd@qq.com', 'password' => 'adfdsaf'), false) in AuthenticatesAndRegistersUsers.php line 79
at AuthController->postLogin(object(Request))
at call_user_func_array(array(object(AuthController), 'postLogin'), array(object(Request))) in Controller.php line 246
at Controller->callAction('postLogin', array(object(Request))) in ControllerDispatcher.php line 162
at ControllerDispatcher->call(object(AuthController), object(Route), 'postLogin') in ControllerDispatcher.php line 107
at ControllerDispatcher->Illuminate\Routing{closure}(object(Request))
已邀请:

it男那点事

赞同来自:

也不贴代码。。。
估计是SQL最后没有get(),或first()

梦小天

赞同来自:

楼主问题是怎么解决的?

要回复问题请先登录注册