求助:Laravel 读取不到微秒数?
<?php
// routes.php
Route::get('/', function () {
$test = \DB::select('select * from test');
dd($test[0]->time);
});
CREATE TABLE `test` (
`id` int(10) UNSIGNED NOT NULL,
`time` datetime(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `test` (`id`, `time`) VALUES ('1', '2016-04-04 00:00:00.123');
输出 2016-04-04 00:00:00。如何得到微秒数,大家帮帮我
推荐文章: