Closed dafa168 closed 5 years ago
未复现,得到的二维数组每个元素是正常数组。
https://laravel-china.org/docs/laravel/5.3/queries/1187#retrieving-results https://laravel-china.org/docs/laravel/5.2/queries/1137#retrieving-results
Laravel 5.3之前版本是返回数组,5.3及以后版本返回Collection集合对象。
Tell us your software version How to know it?
7.2.8
4.2.0
5.7
Detail description about this issue(error/log)
我在这个文件中加入了此段代码: app/Providers/EventServiceProvider.php
问题: 当我在 laravel本身的命令行中使用DB::get()->toArray() 查询出来得到的是二位数组里面是一维数组。
但是在 laravels 启动的异步任务中使用 DB::get()->toArray() 查询出来得到的是二位数组里面是对象 ?
感觉是laravels中应该是没有执行到上面的事件代码吧
Give us a
reproducible
code block andsteps