CDN URL Method

The cdn_url method purpose is to load assets file with CDN URL prefix.

Basic Usage

Here is the basic usage for cdn_url method from SENE_Controller class.

$this->cdn_url(string $location): $this

Parameters

cdn_url has 1 parameter there is $location.

$location

Value for $location can be an relative url without CDN URL prefix.

The Configuration

The CDN URL purpose is to create base url for CDN usage. Here is example codes on development.php file.

...
$cdn_url = 'https://cdn.cenah.co.id/';
...

Example Usage

Here is the example usage cdn_url in a view file.

...
<div class="logo-container">
  <img src="<?=$this->cdn_url('assets/images/logo-cenah.png')?>" class="logo-fluid" alt="logo Cipta Esensi Merenah" />
</div>
...