To::path()

Converts public URL to private file path.

Table of Contents
  1. Description
  2. Example

Description

To::path(?string $value): ?string;

This method converts public URL to private file path. To do the opposite, use To::URL() method.

Example

$value = To::path('http://127.0.0.1/lot/asset/book.pdf'); // Returns `'.\lot\asset\book.pdf'`

To::URL()

Converts private file path to public URL, or decodes URL special characters.

To::entity()

Converts characters to their corresponding HTML entities.

To::file()

Converts current value to a safe file name.

To::path()

Converts public URL to private file path.