Facade
Laratusk\Larasvg\Facades\SvgConverter
The facade provides static access to the SvgConverterManager instance.
Methods
open(string $path): Provider
Open a local SVG file for conversion. The path must be an absolute file path — use Laravel's path helpers such as resource_path(), storage_path(), base_path(), or public_path().
$converter = SvgConverter::open(resource_path('svg/file.svg'));Throws: SvgConverterException if the file does not exist.
openFromDisk(string $disk, string $path): Provider
Open a file from a Laravel filesystem disk. The file is downloaded to a temporary location.
$converter = SvgConverter::openFromDisk('s3', 'designs/logo.svg');Throws: SvgConverterException if the file does not exist on the disk.
openFromContent(string $content, string $extension = 'svg'): Provider
Open from raw SVG content. The content is written to a temporary file.
$converter = SvgConverter::openFromContent($svgString);using(string $provider): SvgConverterManager
Switch the provider for the next operation. Resets after the operation completes.
$converter = SvgConverter::using('inkscape')->open(resource_path('svg/file.svg'));version(?string $provider = null): string
Get the version string of the default or specified provider.
$version = SvgConverter::version(); // Default provider
$version = SvgConverter::version('inkscape'); // Specific provideractionList(): string
Get the list of available Inkscape actions. Only available when using the Inkscape provider.
$actions = SvgConverter::using('inkscape')->actionList();getBinary(?string $provider = null): string
Get the configured binary path for the default or specified provider.
$binary = SvgConverter::getBinary(); // Default provider
$binary = SvgConverter::getBinary('inkscape'); // Specific providergetTimeout(?string $provider = null): int
Get the configured timeout for the default or specified provider.
$timeout = SvgConverter::getTimeout(); // 60getDefaultDisk(): string
Get the configured default filesystem disk.
$disk = SvgConverter::getDefaultDisk(); // 'local'