PHP Classes

File: readme.md

Recommend this page to a friend!
  Classes of Ogbemudia Osayawe   Legato PHP Asset Management   readme.md   Download  
File: readme.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Legato PHP Asset Management
Get versioned URLs for CSS, JavaScript and images
Author: By
Last change:
Date: 5 years ago
Size: 904 bytes
 

Contents

Class file image Download

Legato Asset

A simple tool for generating unique versioned URLs for images, stylesheet, javascript, etc.

Installation

composer require legato/asset

Usage


Relative Path
<link href="<?= asset('css/style.css') ?>" rel="stylesheet">

Absolute Path
<link href="<?= asset('/css/style.css') ?>" rel="stylesheet">

Relative Path Output

css/style.css?7ddf32e17a6ac5ce04a8ecbf782ca509

<link href="css/style.css?7ddf32e17a6ac5ce04a8ecbf782ca509" rel="stylesheet">

Absolute Path Output

/css/style.css?7ddf32e17a6ac5ce04a8ecbf782ca509

<link href="/css/style.css?7ddf32e17a6ac5ce04a8ecbf782ca509" rel="stylesheet">

Specifying A query String


<link href="<?= asset('css/style.css', 'v1') ?>" rel="stylesheet">

css/style.css?v1=7ddf32e17a6ac5ce04a8ecbf782ca509

<link href="css/style.css?v1=7ddf32e17a6ac5ce04a8ecbf782ca509" rel="stylesheet">