The asset function generates a URL for an asset using the current scheme of the request (HTTP or HTTPS):
$url asset('img/photo.jpg');
    function secure_asset($path)

    {

        return 
asset($pathtrue);

    }

}
                throw new Exception("Unable to locate file in Vite manifest: {$entrypoint}.");

            }



            
$tags->push($this->makeTag(asset("{$buildDirectory}/{$manifest[$entrypoint]['file']}")));



            if (isset(
$manifest[$entrypoint]['css'])) {

                foreach (
$manifest[$entrypoint]['css'] as $css) {
            if (isset($manifest[$entrypoint]['css'])) {

                foreach (
$manifest[$entrypoint]['css'] as $css) {

                    
$tags->push($this->makeStylesheetTag(asset("{$buildDirectory}/{$css}")));

                }

            }
                foreach ($manifest[$entrypoint]['imports'] as $import) {

                    if (isset(
$manifest[$import]['css'])) {

                        foreach (
$manifest[$import]['css'] as $css) {

                            
$tags->push($this->makeStylesheetTag(asset("{$buildDirectory}/{$css}")));

                        }

                    }

                }