src/Factory.php
protected function isWritableWithAsset(string $name, string $path): bool
    {
        $files = $this->app->make('files');
        $publicPath = $this->app['path.public'];
        $targetPath = "{$publicPath}/packages/{$name}";

        if (Str::contains($name, '/') && ! $files->isDirectory($targetPath)) {
            list($vendor) = \explode('/', $name);
            $targetPath = "{$publicPath}/packages/{$vendor}";
        }

        $isWritable = $files->isWritable($targetPath);

        if ($files->isDirectory($path) && ! $isWritable) {
            return false;
        }

        return true;
    }
protected function isWritableWithAsset(string $name, string $path): bool
    {
        $files = $this->app->make('files');
        $publicPath = $this->app['path.public'];
        $targetPath = "{$publicPath}/packages/{$name}";

        if (Str::contains($name, '/') && ! $files->isDirectory($targetPath)) {
            list($vendor) = \explode('/', $name);
            $targetPath = "{$publicPath}/packages/{$vendor}";
        }

        $isWritable = $files->isWritable($targetPath);

        if ($files->isDirectory($path) && ! $isWritable) {
            return false;
        }

        return true;
    }
Check whether an extension has a writable public asset.

@param  string  $name
@param  string  $path

@return bool