Beispiel #1
0
/**
 * Asset dosyasının yolunu
 * @param string $asset
 * @return string
 */
function asset($asset = '')
{
    $path = new \Anonym\Assets\VersionPackpage('', '%v%f');
    return $path->getUrl($asset);
}
Beispiel #2
0
 /**
  * get the registered csrf token
  *
  * @param string $name
  * @return string
  */
 function asset($name = null)
 {
     $document = explode('/', rtrim(app('http.request')->uri, "/"));
     $document = end($document);
     $defaultPath = $document === 'public' ? 'assets/' : 'public/assets/';
     $packpage = new \Anonym\Assets\VersionPackpage('', '%f', $defaultPath);
     return $name !== null ? $packpage->getUrl($name) : $defaultPath;
 }