예제 #1
0
 /**
  * @param array $attributes
  *
  * @return $this
  */
 public function updateWithRelations(array $attributes)
 {
     parent::updateWithRelations($attributes);
     $this->name = $attributes['name'];
     return $this;
 }
예제 #2
0
 public function registerMediaConversions()
 {
     parent::registerMediaConversions();
     $this->addMediaConversion('thumb')->setWidth(368)->setHeight(232)->performOnCollections('images');
 }
예제 #3
0
 /**
  * @param array $attributes
  *
  * @return $this
  */
 public function updateWithRelations(array $attributes)
 {
     parent::updateWithRelations($attributes);
     $this->publish_date = Carbon::createFromFormat('d/m/Y', $attributes['publish_date']);
     return $this;
 }