src/MediaTrait.php
public function updateMediaById($id, $options) {
    $this->options = $options;

    $this->parseOptions();

    $model = config('media.config.model');
    $this->media = $model::find($id);

    $this->media->alt = $this->getAlt();
    $this->media->title = $this->getTitle();
    $this->media->name = $this->getName();
    $this->media->weight = $this->getWeight();

    $this->media->save();
  }
public function updateMediaById($id, $options) {
    $this->options = $options;

    $this->parseOptions();

    $model = config('media.config.model');
    $this->media = $model::find($id);

    $this->media->alt = $this->getAlt();
    $this->media->title = $this->getTitle();
    $this->media->name = $this->getName();
    $this->media->weight = $this->getWeight();

    $this->media->save();
  }
Update the meta data of a certain media file.

@param $id int
The ID of the media item to update

@param $options array
An key => value array of elements in the DB to change, key must be one of:
'alt', 'title', 'name', 'weight'

@return void