src/MediaUploader.php
private function verifyDisk($disk)
    {
        if (! array_key_exists($disk, config('filesystems.disks'))) {
            throw ConfigurationException::diskNotFound($disk);
        }

        if (! in_array($disk, $this->config['allowed_disks'])) {
            throw ForbiddenException::diskNotAllowed($disk);
        }

        return $disk;
    }
private function verifyDisk($disk)
    {
        if (! array_key_exists($disk, config('filesystems.disks'))) {
            throw ConfigurationException::diskNotFound($disk);
        }

        if (! in_array($disk, $this->config['allowed_disks'])) {
            throw ForbiddenException::diskNotAllowed($disk);
        }

        return $disk;
    }
private function verifyDisk ( $ disk ) { if ( ! array_key_exists ( $ disk , config ( 'filesystems.disks' ) ) ) { throw ConfigurationException :: diskNotFound ( $ disk ) ; } if ( ! in_array ( $ disk , $ this -> config [ 'allowed_disks' ] ) ) { throw ForbiddenException :: diskNotAllowed ( $ disk ) ; } return $ disk ; }
Ensure that the provided filesystem disk name exists and is allowed.
@param  string $disk
@return string
@throws \Plank\Mediable\Exceptions\MediaUpload\ConfigurationException If the disk does not exist
@throws \Plank\Mediable\Exceptions\MediaUpload\ForbiddenException If the disk is not included in the `allowed_disks` config.
Ensure that the provided filesystem disk name exists and is allowed .