So, what are you counting in that part of the view?
Parameter must be an array or an object that implements Countable :Laravel.log
I'm running a streaming website on Laravel. I have changed some permissions to some pages to enable the admin upload of some media. I had also configured php.ini to change upload limit. All worked fine until I enter the UI as a logged user and when I click on a link that is suppose to send me to a user.blade that is a child of the master user.blade the page loads the redirect back the to dashboard. I received this error on Laravel.log
Next ErrorException: count(): Parameter must be an array or an object that implements Countable (View: /var/www/html/resources/views/user/single-video.blade.php) in /var/www/html/storage/framework/views/5c4244f87d80a74a83ff85808c78884f1a852ddf.php:132
The stack trace is showing the following:
Stack trace: #0 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(44): Illuminate\View\Engines\CompilerEngine->handleViewException() #1 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath() #2 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(149): Illuminate\View\Engines\CompilerEngine->get() #3 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(120): Illuminate\View\View->getContents() #4 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(85): Illuminate\View\View->renderContents() #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Response.php(53): Illuminate\View\View->render() #6 /var/www/html/vendor/symfony/http-foundation/Response.php(201): Illuminate\Http\Response->setContent() #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1085): Symfony\Component\HttpFoundation\Response->__construct() #8 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(94): Illuminate\Routing\Router->prepareResponse() #9 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}() #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func() #11 /var/www/html/app/Http/Middleware/Authenticate.php(28): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}() #12 [internal function]: App\Http\Middleware\Authenticate->handle() #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array() #14 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}() #15 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func() #16 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}() #17 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func() #18 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(96): Illuminate\Pipeline\Pipeline->then() #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(54): Illuminate\Routing\ControllerDispatcher->callWithinStack() #20 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(175): Illuminate\Routing\ControllerDispatcher->dispatch() #21 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(141): Illuminate\Routing\Route->runController() #22 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(724): Illuminate\Routing\Route->run() #23 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}() #24 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func() #25 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}() #26 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle() #27 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array() #28 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}() #29 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func() #30 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}() #31 [internal function]: Illuminate\Session\Middleware\StartSession->handle() #32 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array() #33 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}() #34 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func() #35 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}() #36 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() #37 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array() #38 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}() #39 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func() #40 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}() #41 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle() #42 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array() #43 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}() #44 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func() #45 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}() #46 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func() #47 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(726): Illuminate\Pipeline\Pipeline->then() #48 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(699): Illuminate\Routing\Router->runRouteWithinStack() #49 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(675): Illuminate\Routing\Router->dispatchToRoute() #50 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(246): Illuminate\Routing\Router->dispatch() #51 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}() #52 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func() #53 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}() #54 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle() #55 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array() #56 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}() #57 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func() #58 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}() #59 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func() #60 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(132): Illuminate\Pipeline\Pipeline->then() #61 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(99): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() #62 /var/www/html/index.php(53): Illuminate\Foundation\Http\Kernel->handle() #63 {main}
I hope someone can tell me if this is the result of a code bug or just permissions issue. Any suggestion is welcome :))
Please or to participate in this conversation.