Laravel 8 undefined error Illuminate\\Support\\Collection::getArrayableItems()

Viewed 1850

Using laravel v8.7* Using apache server and used deployer to deploy the Laravel application on the server. Having issues once deployed to a server.

I get the following error:

PHP Fatal error: Uncaught Error: Call to undefined method Illuminate\Support\Collection::getArrayableItems() in /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Collections/Collection.php:31\n Stack trace:\n #0 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Collections/helpers.php(15): Illuminate\Support\Collection->__construct(Array)\n#1 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Support/Traits/ReflectsClosures.php(49): collect(Array)\n #2 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/ReportableHandler.php(62): Illuminate\Foundation\Exceptions\ReportableHandler->firstClosureParameterTypes(Object(Closure))\n #3 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(234): Illuminate\Foundation\Exceptions\ReportableHandler->handles(Object(Symfony\Component\ErrorHandler\Error\FatalError))\n #4 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Foundati in /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Collections/Collection.php on line 31

Used the following instructions to deploy Note: using apache server over ngnix as apache is currently running other applications on the server.

1 Answers

Have you checked if the PHP version on the droplet is the same as the PHP version you have been using locally? This looks like an error that will occur if you change versions between PHP / Laravel.

Related