If you don’t want Eloquent to automatically manage created_at and updated_at columns, which of the following will be correct?

Viewed 453
  1. Set the model $timestamps property to false.

  2. Eloquent will always automatically manage created_at and updated_at columns.

  3. Set the model $created_at and updated_at properties to false.

I searched the net and found a lot of solution and what must be the real answer to this question,

I found that we can disable it add a line into the eloquent to make timestamp false

class User extends Eloquent {

    protected $table = 'users';

    public $timestamps = false;

}

But we can also remove the created_at and updated_at and do not use it in the model so 3rd point is also true here?

So what is the proper solution for this question?

1 Answers
Related