0

I wanted to run

php artisan scout:import App\\Product

but composer showing

  [ErrorException]
  count(): Parameter must be an array or an object that implements Countable

In my composer.json I have this

  "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.3.*",
        "laravelcollective/html":"5.3.*",
        "gloudemans/shoppingcart": "^2.2",
        "intervention/image": "^2.4",
        "laravel/scout": "1.0",
        "teamtnt/laravel-scout-tntsearch-driver": "1.*"
    },

I can't fighure out the problem

1 Answers1

0

This is a documented change in PHP 7.2. You need to either update Laravel to 5.6 or downgrade PHP to version 7.1.

https://wiki.php.net/rfc/counting_non_countables

count(): Parameter must be an array or an object that implements Countable

hurnhu
  • 888
  • 2
  • 11
  • 30