PHP code example of adepem / laravel-assets-upload

1. Go to this page and download the library: Download adepem/laravel-assets-upload 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/ */

    

adepem / laravel-assets-upload example snippets


return [
    'filesystem' => env('ASSETS_UPLOAD_FILESYSTEM', false),

    'cache-control' => [
        'css' => env('ASSETS_UPLOAD_CACHE_CONTROL_CSS', 604800), // 7 days
        'js' => env('ASSETS_UPLOAD_CACHE_CONTROL_JS', 604800), // 7 days
        'woff2' => env('ASSETS_UPLOAD_CACHE_CONTROL_WOFF2', 31536000), // 365 days
    ],

    'directories' => [
        'public/css',
        'public/js',
    ]
];
bash
php artisan vendor:publish --provider="Adepem\AssetsUpload\AssetsUploadServiceProvider" --tag="assets-upload-config"
bash
php artisan assets:upload