PHP code example of bigfork / silverstripe-vitesse
1. Go to this page and download the library: Download bigfork/silverstripe-vitesse library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bigfork / silverstripe-vitesse example snippets
use Bigfork\Vitesse\Vite;
use SilverStripe\CMS\Controllers\ContentController;
class PageController extends ContentController
{
protected function init()
{
parent::init();
Vite::inst()->useScriptTagAttributes(['data-foo' => 'bar']);
}
}