A
A
AleDv2016-02-05 12:31:07
Laravel
AleDv, 2016-02-05 12:31:07

Why is the created_at field updated when the model is updated in Laravel 5?

I save the changed model using the update() method in this way:
$model->update($input);
The model is updated as it should, but at the same time the "created_at" field is updated, which, in theory, should be filled when the model is created and never change. Or am I wrong?
Question: how to make the "created_at" field not changed when the model is updated?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan, 2016-02-05
@AleDv

In a DB of the trigger or ON UPDATE SETa case is not present?

A
Alexander Ruchkin, 2014-09-28
@Aligatro

regex101.com/r/jH1qR5/1
How can she deal with "(0338)" if all options are three digits?

B
BLR_BOBR1K, 2014-11-13
@BLR_BOBR1K

I found a similar example, you need a condition to check for closing brackets and the presence of all hyphens or their absence, I don’t know much about regular ones, so you have screenshots of
the PS book Forta Regular Expressions 10 minutes per lesson. There are sites like http://www.regexr.com (does not work with the condition) or as they threw off above regex101.com to check expressions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question