PHP code example of morningtrain / enqueuer

1. Go to this page and download the library: Download morningtrain/enqueuer 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/ */

    

morningtrain / enqueuer example snippets

 php
morningtrain\enqueuer\enqueuerServiceProvider::class,
 php

{!! Enqueuer::getAdminScripts() !!}

 php

{!! Enqueuer::getAdminStyles() !!}

 php

Enqueuer::clearAllCache();

 php

Enqueuer::clearScriptsCache();

 php

Enqueuer::clearStylesCache();

 php

Enqueuer::clearAdminScriptsCache();

 php

Enqueuer::clearAdminStylesCache();

 php

Enqueuer::configure([
	'cacheScripts' => true,
	'cacheStyles' => true,
	'alwaysGenerateStylesCache' => false,
	'alwaysGenerateScriptsCache' => false,
	'storageDisk' => 'public'
]);