Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

array_combine(): Both parameters should have an equal number of elements #35

Open
peterjaap opened this issue May 24, 2020 · 0 comments

Comments

@peterjaap
Copy link

peterjaap commented May 24, 2020

When I run tinker(['id', 'title', 'description', 'completed_at', 'category']);, it gives me;

   ErrorException 

  array_combine(): Both parameters should have an equal number of elements

  at vendor/illuminate/support/Collection.php:725
    721|      * @return static
    722|      */
    723|     public function combine($values)
    724|     {
  > 725|         return new static(array_combine($this->all(), $this->getArrayableItems($values)));
    726|     }
    727| 
    728|     /**
    729|      * Union the collection with the given items.

      +1 vendor frames 
  2   app/Commands/TaskList.php:38
      Illuminate\Support\Collection::combine()

  3   app/Commands/TaskList.php:81
      App\Commands\tinker()

Version info;

$ composer show | grep laravel
laravel-zero/foundation               v7.4.0          This is a mirror from illuminate/foundation.
laravel-zero/framework                v7.2.1          The Laravel Zero Framework.
laravel/tinker                        v2.3.0          Powerful REPL for the Laravel framework.
$ composer show | grep caleb  
calebporzio/awesome-helpers           v2.4.5          Helper functions I find super-duper handy
$ php -v
PHP 7.4.6 (cli) (built: May 14 2020 10:03:07) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.6, Copyright (c), by Zend Technologies
    with Xdebug v2.9.5, Copyright (c) 2002-2020, by Derick Rethans
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant