app\models\Song::getS3ParamsAttribute PHP Method

getS3ParamsAttribute() public method

Get the bucket and key name of an S3 object.
public getS3ParamsAttribute ( ) : boolean | array
return boolean | array
    public function getS3ParamsAttribute()
    {
        if (!preg_match('/^s3:\\/\\/(.*)/', $this->path, $matches)) {
            return false;
        }
        list($bucket, $key) = explode('/', $matches[1], 2);
        return compact('bucket', 'key');
    }