<?php

namespace Core;

class Asset
{
    public static function url($path)
    {
        $fullPath = __DIR__ . '/../../public' . $path;
        if (file_exists($fullPath)) {
            $version = filemtime($fullPath);
            return $path . '?v=' . $version;
        }
        return $path;
    }
}
