src/MediaTrait.php
private function setup() {
    $this->public_path = rtrim(config('media.config.public_path'), '/\\') . '/';
    $this->files_directory = rtrim(ltrim(config('media.config.files_directory'), '/\\'), '/\\') . '/';

    $this->create_sub_directories = config('media.config.sub_directories');

    $this->directory = $this->public_path . $this->files_directory;
    if ($this->create_sub_directories) {
      $this->directory_uri = Str::lower(class_basename($this)) . '/';
    }

    $this->directory .= $this->directory_uri;

    if (!empty($this->file)) {
      $this->filename_original = $this->file->getClientOriginalName();
      $this->filename_new = $this->getFilename();
    }
  }
private function setup() {
    $this->public_path = rtrim(config('media.config.public_path'), '/\\') . '/';
    $this->files_directory = rtrim(ltrim(config('media.config.files_directory'), '/\\'), '/\\') . '/';

    $this->create_sub_directories = config('media.config.sub_directories');

    $this->directory = $this->public_path . $this->files_directory;
    if ($this->create_sub_directories) {
      $this->directory_uri = Str::lower(class_basename($this)) . '/';
    }

    $this->directory .= $this->directory_uri;

    if (!empty($this->file)) {
      $this->filename_original = $this->file->getClientOriginalName();
      $this->filename_new = $this->getFilename();
    }
  }
Setup variables and file systems (basically constructor,
but actual trait __contruct()'s are bad apparently)