/**
  * Find a folder by it's name and parent folder.
  *
  * @param                 $name
  * @param DiskInterface   $disk
  * @param FolderInterface $parent
  * @return null|FolderInterface
  */
 public function findByName($name, DiskInterface $disk, FolderInterface $parent = null)
 {
     return $this->model->where('name', $name)->where('disk_id', $disk->getId())->where('parent_id', $parent ? $parent->getId() : null)->first();
 }
 /**
  * Find a folder by it's slug.
  *
  * @param $slug
  * @return null|FolderInterface
  */
 public function findBySlug($slug)
 {
     return $this->model->where('slug', $slug)->first();
 }