For the CakePHP the Versioning of URL option is already exists in core.php
Check in core.php
* Apply timestamps with the last modified time to static assets (js, css, images).
* Will append a query string parameter containing the time the file was modified. This is
* useful for invalidating browser caches.
* Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
* timestamping regardless of debug value.
// Configure::write('Asset.timestamp', true);
In CakePHP 3.x (in config/app.php)
'Asset' => [ 'force' ]
In CakePHP 2.x (in app/Config/core.php)
If you only want to apply the timestamps while debug mode is enabled set the above to true instead of force.