ErrorException: Attempt to read property "chat_room_id" on string in C:\xampp\htdocs\capstone\app\Events\NewChatMessage.php:42
Stack trace:
#0 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(256): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Attempt to read...', 'C:\\xampp\\htdocs...', 42)
#1 C:\xampp\htdocs\capstone\app\Events\NewChatMessage.php(42): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'Attempt to read...', 'C:\\xampp\\htdocs...', 42)
#2 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Broadcasting\BroadcastEvent.php(80): App\Events\NewChatMessage->broadcastOn()
#3 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): Illuminate\Broadcasting\BroadcastEvent->handle(Object(Illuminate\Broadcasting\BroadcastManager))
#4 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Container\Util.php(43): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#5 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#6 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#7 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Container\Container.php(754): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#8 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(132): Illuminate\Container\Container->call(Array)
#9 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(169): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#10 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(126): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#11 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Bus\Dispatcher.php(136): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#12 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(125): Illuminate\Bus\Dispatcher->dispatchNow(Object(Illuminate\Broadcasting\BroadcastEvent), false)
#13 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(169): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#14 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(126): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#15 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(120): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#16 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Queue\CallQueuedHandler.php(68): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\DatabaseJob), Object(Illuminate\Broadcasting\BroadcastEvent))
#17 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Queue\Jobs\Job.php(102): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\DatabaseJob), Array)
#18 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Queue\Worker.php(444): Illuminate\Queue\Jobs\Job->fire()
#19 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Queue\Worker.php(394): Illuminate\Queue\Worker->process('database', Object(Illuminate\Queue\Jobs\DatabaseJob), Object(Illuminate\Queue\WorkerOptions))
#20 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Queue\Worker.php(180): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\DatabaseJob), 'database', Object(Illuminate\Queue\WorkerOptions))
#21 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Queue\Console\WorkCommand.php(148): Illuminate\Queue\Worker->daemon('database', 'default', Object(Illuminate\Queue\WorkerOptions))
#22 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Queue\Console\WorkCommand.php(131): Illuminate\Queue\Console\WorkCommand->runWorker('database', 'default')
#23 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle()
#24 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Container\Util.php(43): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#25 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#26 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#27 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Container\Container.php(754): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#28 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Console\Command.php(209): Illuminate\Container\Container->call(Array)
#29 C:\xampp\htdocs\capstone\vendor\symfony\console\Command\Command.php(318): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#30 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Console\Command.php(178): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#31 C:\xampp\htdocs\capstone\vendor\symfony\console\Application.php(1092): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#32 C:\xampp\htdocs\capstone\vendor\symfony\console\Application.php(341): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 C:\xampp\htdocs\capstone\vendor\symfony\console\Application.php(192): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(197): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 C:\xampp\htdocs\capstone\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(1234): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 C:\xampp\htdocs\capstone\artisan(16): Illuminate\Foundation\Application->handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))
#37 {main}