Devise\Media\Categories\CategoryPaths::serverPath PHP Method

serverPath() public method

Server path is the real path to the root media directory
public serverPath ( $path ) : string
$path
return string
    public function serverPath($path)
    {
        $path = $path != '' ? $path . '/' : '';
        return public_path() . '/' . $this->Config->get('devise.media-manager.root-dir') . '/' . $path;
    }

Usage Example

Example #1
0
 /**
  * Removes the category path
  *
  * @param $input
  * @return bool
  */
 public function destroyCategory($input)
 {
     if (isset($input['category'])) {
         $localPath = $this->CategoryPaths->fromDot($input['category']);
         $serverPath = $this->CategoryPaths->serverPath($localPath);
         return $this->Filesystem->deleteDirectory($serverPath);
     }
     return false;
 }
All Usage Examples Of Devise\Media\Categories\CategoryPaths::serverPath