Skip to content

[5.2] updated_at column always updated, regardless of 'timestamps' option #13400

@guillemc

Description

@guillemc

Doing something like:

$user->name = 'user ' . date('H:i:s');
$user->save(['timestamps' => false]);

Results in:

'name' => 'user 12:36:35'
'updated_at' => '2016-05-02 12:36:35'

The reason appears to be that, although in the model's performUpdatemethod the updated_at column is discarded, Illuminate\Database\Eloquent\Builder adds it again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions