PHP code example of elabx / processwire-alpinejs
1. Go to this page and download the library: Download elabx/processwire-alpinejs 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/ */
elabx / processwire-alpinejs example snippets
$wire->addHookAfter('AlpineJS::getCoreScriptUrl', function($event) {
$event->return = '/site/templates/scripts/alpine.js';
});
// Load only Alpine Core
echo $modules->get('AlpineJS')->renderScripts();
// Load Alpine Core + Plugins
echo $modules->get('AlpineJS')->renderScripts(['intersect', 'persist']);