app/Dorcas/Support/helpers.php
/**
 * Generates an asset URL for static content, taking the CDN into consideration
 *
 * @param string $path
 * @param bool   $secure
 *
 * @return string
 */
Generates an asset URL for static content, taking the CDN into consideration
@param string $path
@param bool   $secure

@return string
Generates an asset URL for static content taking the CDN into consideration @param string $path @param bool $secure @return string
function cdn(string $path, bool $secure = true)
{
    $base = config('app.cdn_url', config('app.url'));
    $secure = app()->environment() === 'production' ? $secure : false;
    return custom_url($base, $path, null, $secure);
}
function cdn ( string $ path , bool $ secure = true ) { $ base = config ( 'app.cdn_url' , config ( 'app.url' ) ) ; $ secure = app ( ) -> environment ( ) === 'production' ? $ secure : false ; return custom_url ( $ base , $ path , null , $ secure ) ; }
Generates an asset URL for static content, taking the CDN into consideration
 @param string $path
 @param bool   $secure
Generates an asset URL for static content taking the CDN into consideration @param string $path @param bool $secure
# we get the base URL first # on local, we turn secure mode off