PHP code example of fadoe / symfony-asset-module

1. Go to this page and download the library: Download fadoe/symfony-asset-module 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/ */

    

fadoe / symfony-asset-module example snippets


return [
    'fadoe_symfony_asset_module' => [
        'version' => 1,
        'version_format' => null,
        'base_path' => null,
        'base_urls' => null,
        'packages' => [],
    ],
];

return [
    'fadoe_symfony_asset_module' => [
        'version' => 1,
        'version_format' => "%s?v=%s,
        'base_path' => null,
        'base_urls' => null,
        'packages' => [
            'project' => [
                'version' => 1,
                'base_path' => 'image/project'
            ],
        ],
    ],
];

 echo $this->assetUrl('image.jpg'); 

 echo $this->assetUrl('image.jpg', 'project'); 
autoload/global.php