ErrorException: foreach() argument must be of type array|object, string given in C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\app\Jobs\ImportMedicinesMappingJob.php:40
Stack trace:
#0 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(270): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'foreach() argum...', 'C:\\Users\\Astra\\...', 40)
#1 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\app\Jobs\ImportMedicinesMappingJob.php(40): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'foreach() argum...', 'C:\\Users\\Astra\\...', 40)
#2 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): App\Jobs\ImportMedicinesMappingJob->handle()
#3 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Container\Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#4 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#5 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#6 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Container\Container.php(661): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#7 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(128): Illuminate\Container\Container->call(Array)
#8 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(141): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(App\Jobs\ImportMedicinesMappingJob))
#9 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\ImportMedicinesMappingJob))
#10 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#11 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(123): Illuminate\Bus\Dispatcher->dispatchNow(Object(App\Jobs\ImportMedicinesMappingJob), false)
#12 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(141): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(App\Jobs\ImportMedicinesMappingJob))
#13 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\ImportMedicinesMappingJob))
#14 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#15 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(70): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\DatabaseJob), Object(App\Jobs\ImportMedicinesMappingJob))
#16 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Queue\Jobs\Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\DatabaseJob), Array)
#17 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Queue\Worker.php(425): Illuminate\Queue\Jobs\Job->fire()
#18 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Queue\Worker.php(375): Illuminate\Queue\Worker->process('database', Object(Illuminate\Queue\Jobs\DatabaseJob), Object(Illuminate\Queue\WorkerOptions))
#19 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Queue\Worker.php(173): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\DatabaseJob), 'database', Object(Illuminate\Queue\WorkerOptions))
#20 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Queue\Console\WorkCommand.php(147): Illuminate\Queue\Worker->daemon('database', 'default', Object(Illuminate\Queue\WorkerOptions))
#21 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Queue\Console\WorkCommand.php(130): Illuminate\Queue\Console\WorkCommand->runWorker('database', 'default')
#22 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle()
#23 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Container\Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#24 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#25 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#26 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Container\Container.php(661): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#27 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Console\Command.php(183): Illuminate\Container\Container->call(Array)
#28 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\symfony\console\Command\Command.php(326): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#29 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Console\Command.php(152): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#30 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\symfony\console\Application.php(1063): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#31 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\symfony\console\Application.php(320): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#32 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\symfony\console\Application.php(174): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Console\Application.php(102): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(155): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 C:\Users\Astra\Desktop\Astra Projects\dashboard-medlite\artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 {main}