我似乎无法从雄辩的模型中获得create_at
timstamp,但对于其他列似乎并非如此。 id
。有人可以帮我解决这个问题吗?
数据表
代码
//getting the collection
$collection = Scan::findOneById($scan->id);
//getting the first object(There is only one)
$storedScan = $collection->first();
//Util to get the type and prints it to console
Utils::printType($storedScan->id);
Utils::printType($storedScan->create_at);
输出
Type: integer
Type: NULL
答案 0 :(得分:1)
数据库列名为create d _at