I'm new to PHP/Laravel.
My model extends the default Model class.
class LobModel extends Model
class AlarmActions extends LobModel
When I try to update a row in AlarmActions
table; I'm getting
SQLSTATE[42S22]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid column name 'updated_at'. (SQL: update [AlarmActions] set [AlarmActionDescription] = sdsf, [UTCDateTimeUpdated] = 2017-08-11 00:42:05.000, [updated_at] = 2017-08-11 00:42:05.000 where [AlarmActionId] = 19621)
I do not have column updated_at
defined in my AlarmActions
table.
But I see, in the default Model class following columns are defined. How can I skip those two columns?
const UPDATED_AT = 'updated_at';
const CREATED_AT = 'created_at';
Im' calling save
method to update a row.
$alarmAction->save();
Add
public $timestamps = false;
to your AlarmActions
model
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With