PHP code example of sourceboat / wp-laravel-elixir

1. Go to this page and download the library: Download sourceboat/wp-laravel-elixir 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/ */

    

sourceboat / wp-laravel-elixir example snippets


add_action('wp_enqueue_scripts', function () {
    wp_register_style('main-css', elixir('css/main.css'), null, null);
    wp_enqueue_style('main-css');
    
    wp_register_script('main-js', elixir('js/main.js'), null, null, true);
    wp_enqueue_script('main-js');
});