/**
* Change the class to use for generated Media.
* @param string $class
* @return static
* @throws \Plank\Mediable\Exceptions\MediaUpload\ConfigurationException if $class does not extend Plank\Mediable\Media
*/
public function setModelClass($class)
{
if (!is_subclass_of($class, Media::class)) {
throw ConfigurationException::cannotSetModel($class);
}
$this->config['model'] = $class;
return $this;
}