PHP code example of slouma2000 / laravel-webpack-manifest

1. Go to this page and download the library: Download slouma2000/laravel-webpack-manifest 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/ */

    

slouma2000 / laravel-webpack-manifest example snippets


$webpackAssets = webpack();
// Full urls with hostname
echo $webpackAssets->url('app.js'); // http://host.dev/assets/1b53147322421b069bf1.js
echo $webpackAssets->url('app.css'); // http://host.dev/assets/css/20a7e7e51e1f142b2b1f.css

// Relative paths
echo $webpackAssets->path('app.js'); // /assets/1b53147322421b069bf1.js