0

can someone help me with this error?

Indirect modification of overloaded property App\Article::$atributes has no effect

Here's the code:

public function setPublishedAtAttribute($date){
    $this->atributes['published_at'] = Carbon::createFromFormat('Y-m-d', $date);
}  

I am trying to add clock to my published_at column...

user3330053
  • 173
  • 1
  • 16
  • Please take a look at this question for some more info: http://stackoverflow.com/questions/10454779/php-indirect-modification-of-overloaded-property – killthrush Aug 08 '15 at 21:40

1 Answers1

0

Oh, I've fount the problem a few minutes after I've posted this question...

$this->attributes['published_at'] = Carbon::createFromFormat('Y-m-d', $date);

I've missed one "t" letter in Attributes. :)

user3330053
  • 173
  • 1
  • 16