PHP code example of elhebert / laravel-sri
1. Go to this page and download the library: Download elhebert/laravel-sri 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/ */
elhebert / laravel-sri example snippets
[
// ...
'hashes' => [
'css/app.css' => 'my_super_hash'
'https://code.jquery.com/jquery-3.3.1.min.js' => 'sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8='
]
]
sh
php artisan vendor:publish --provider="Elhebert\SubresourceIntegrity\SriServiceProvider"