您好,欢迎访问一九零五行业门户网

调用Eloquent Orm save的时候出现问题

错误提示如下:fatal error: uncaught exception 'pdoexception' with message 'sqlstate[42s22]: column not found: 1054 unknown column 'updated_at' in 'field list'' in /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php:369 stack trace: #0 /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php(369): pdo->prepare('insert into bl...') #1 /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php(617): illuminate\database\connection->illuminate\database\{closure}(object(illuminate\database\mysqlconnection), 'insert into bl...', array) #2 /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php(581): illuminatedatabaseconnection->runquerycallback('insert into bl...', array, object(closure)) #3 /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php(370): illuminate\database\connection->run('insert into bl...', array, object(closure)) #4 /home/parallels/desktop/www/vendor in /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php on line 625
回复内容: 错误提示如下:fatal error: uncaught exception 'pdoexception' with message 'sqlstate[42s22]: column not found: 1054 unknown column 'updated_at' in 'field list'' in /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php:369 stack trace: #0 /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php(369): pdo->prepare('insert into bl...') #1 /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php(617): illuminate\database\connection->illuminate\database\{closure}(object(illuminate\database\mysqlconnection), 'insert into bl...', array) #2 /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php(581): illuminatedatabaseconnection->runquerycallback('insert into bl...', array, object(closure)) #3 /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php(370): illuminate\database\connection->run('insert into bl...', array, object(closure)) #4 /home/parallels/desktop/www/vendor in /home/parallels/desktop/www/vendor/illuminate/database/illuminate/database/connection.php on line 625
初步看,是你的表结构中少了字段 updated_at,可以是datetime 或者timestamp 类型
orm好调试吗?
缺少列了。。表最好不要手动建啦。。可以用迁移工具来建
其它类似信息

推荐信息