2

I am running "php artisan botman:list-drivers -v" command in my laravel 5.6 project and getting this error thrown out:

Symfony\Component\Debug\Exception\FatalThrowableError : Type error: Argument 1 passed to Symfony\Component\Console\Helper\Table::setRows() must be of the type array, object given, called in C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Console\Command.php on line 411

at C:\xampp\htdocs\chatbot\vendor\symfony\console\Helper\Table.php: 222
    218|
    219|         return $this;
    220|     }
    221|

    222|     public function setRows(array $rows)
    223|     {
    224|         $this->rows = array();
    225|
    226|         return $this->addRows($rows);

Exception trace:

1
Symfony\Component\Console\Helper\Table::setRows(Object(Tightenco\Collect\Support\Collection)) C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Console\Command.php : 411

2
Illuminate\Console\Command::table(Object(Tightenco\Collect\Support\Collection)) C:\xampp\htdocs\chatbot\vendor\botman\studio-addons\src\Console\Commands\BotManListDrivers.php : 74

3 BotMan\Studio\Console\Commands\BotManListDrivers::handle() C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php : 29

4 call_user_func_array([]) C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php : 29

5
Illuminate\Container\BoundMethod::Illuminate\Container{closure}() C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php : 87

6
Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Object(Closure)) C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php : 31

7
Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), []) C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Container\Container.php : 564

8 Illuminate\Container\Container::call() C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Console\Command.php : 183

9
Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) C:\xampp\htdocs\chatbot\vendor\symfony\console\Command\Command.php : 252

10 Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Console\Command.php : 170

11 Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) C:\xampp\htdocs\chatbot\vendor\symfony\console\Application.php : 865

12 Symfony\Component\Console\Application::doRunCommand(Object(BotMan\Studio\Console\Commands\BotManListDrivers), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) C:\xampp\htdocs\chatbot\vendor\symfony\console\Application.php : 241

13 Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) C:\xampp\htdocs\chatbot\vendor\symfony\console\Application.php : 143

14 Symfony\Component\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Console\Application.php : 88

15 Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) C:\xampp\htdocs\chatbot\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php : 121

16 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) C:\xampp\htdocs\chatbot\artisan : 37

Is there any solution? I am working in new laravel project and am not able to figure out the problem location.

1 Answer 1

1

You are passing $rows which is an object to setRows function which is looking for an array.

Sign up to request clarification or add additional context in comments.

3 Comments

But that's the thing. I haven't done anything yet. It's a brand new laravel project
where did you defined the row property?
All I did is ran "composer create-project laravel/laravel project-name" then this command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.