我在尝试运行php artisan Service时遇到了这个错误。我下载了这个项目,并试图运行它遇到了这个错误。
你们有什么办法可以帮我吗。提前谢谢。我正在使用xampp作为项目的主机服务器。
ErrorException in Builder.php line 1185: count(): Parameter must be an array or an object that implements Countable
in Builder.php line 1185
at HandleExceptions->handleError('2', 'count(): Parameter must be an array or an object that implements Countable', 'C:\xampp\htdocs\bootup-master\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php', '1185', array('scope' => object(Closure), 'parameters' => array(object(Builder)), 'query' => object(Builder)))
at count(null) in Builder.php line 1185
at Builder->callScope(object(Closure)) in Builder.php line 1216
at Builder->applyScopes() in Builder.php line 314
at Builder->get() in HomeController.php line 30
at HomeController->index()
at call_user_func_array(array(object(HomeController), 'index'), array()) in Controller.php line 80
at Controller->callAction('index', array()) in ControllerDispatcher.php line 146
at ControllerDispatcher->call(object(HomeController), object(Route), 'index') in ControllerDispatcher.php line 94
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96
at ControllerDispatcher->callWithinStack(object(HomeController), object(Route), object(Request), 'index') in ControllerDispatcher.php line 54
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\HomeController', 'index') in Route.php line 174
at Route->runController(object(Request)) in Route.php line 140
at Route->run(object(Request)) in Router.php line 724
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TagstripMiddleware.php line 19
at TagstripMiddleware->handle(object(Request), object(Closure))
at call_user_func_array(array(object(TagstripMiddleware), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 64
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Router.php line 726
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 699
at Router->dispatchToRoute(object(Request)) in Router.php line 675
at Router->dispatch(object(Request)) in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 53
at require_once('C:\xampp\htdocs\bootup-master\public\index.php') in server.php line 21
此错误是由PHP
版本引起的。很可能是PHP7.2版本。见下文:
PHP 7.2的文档更改
为了解决这个问题:
不要升级您的PHP
版本
或
修改vendor\laravel\framework\src\illumb\Database\Eloquent\Builder.php
文件的1185行
$originalWhereCount = count ($ query-> wheres);
到
$originalWhereCount = 0;
if (is_array ($ query-> wheres) || is_object ($ query-> wheres)) {
$originalWhereCount = count ($ query-> wheres);
}
当涉及到java打包的细节时,我是一个完全的新手。 我已经通过jdk-15编写了一个使用Java-15的TCP数据服务器,它在VSCODE下运行时工作得相当愉快。 生成mrs_server-1.0.exe。然后创建文件夹C:\Program files\MRS_Server,其中包括mrs_server\app文件夹中我的代码的副本,一个mrs_server\runtime文件夹,我假定它包含运行
问题内容: 我目前在Python脚本中使用该模块的功能,但在换行符方面遇到了一些麻烦。如果不使用该参数,或者如果我使用它,则显示多个换行符,而不是仅一个。 例如 显示: 有谁知道问题出在哪里以及如何使用?仅供参考,我正在使用Python 2.6.1 问题答案: 太糟糕了 这与Windows和’\ r \ n’无关。尝试使用任何字符串作为参数都表明添加了太多行。不仅如此,还添加了其他空格(当机器读取
在TeamCity中运行MSpec构建步骤时,我在TeamCity日志中发现以下错误: 我已经对和MSpec config文件,但它似乎没有帮助。 MSpec运行程序正在本地引用构建代理上的编译DLL,该构建代理在Visual Studio中本地正确运行。有人能解释这个错误的含义以及我如何解决它吗?
在运行时导致错误的servlet中的代码。 JSONArray parent=new JSONArray();
正在尝试启动Apache应用程序...检测到状态更改:检测到运行状态更改:已停止错误:Apache意外关闭。这可能是由于阻塞的端口、缺少依赖项、不正确的特权、崩溃或其他方法关闭。按“日志”按钮查看错误日志,并检查Windows事件查看器以获取更多线索如果需要更多帮助,请复制并在论坛上发布整个日志窗口
我使用的是linux服务器,我已经安装了xamp服务器,当我尝试运行时/opt/lampp/lampp状态我发现正在启动Linux 7.2的XAMPP。3-0... XAMPP:正在启动Apache。。。失败XAMPP:另一个web服务器已在运行。XAMPP:正在启动MySQL。。。好啊XAMPP:正在启动ProFTPD。。。已经在运行了。在cli上 之后,我使用。/opt/lampp/lampp