How to use Dynamic Path
<?php
// Initialize the path
// You can get the absolute file location on the disk, using:
$disk_path = (string)$path; // or...
$disk_path = $path->file();
// You can get the relative URL for the file using:
// You can also use GLDynamicPath for folderss
// You can get the absolute file location of the folder, using:
$disk_folder = (string)$path // or...
$disk_folder = $folder->path();
// You also get a sub-folder using:
$tiles_folder = $folder->path('tiles');
// Or a sub-file, using:
$my_image = $folder->file('image.gif');
// In the same way, you can use it in URLs:
$my_web_image = $folder->url('image.gif');
?>
|
|