PHP code example of kenangundogan / htmlmin

1. Go to this page and download the library: Download kenangundogan/htmlmin 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/ */

    

kenangundogan / htmlmin example snippets


   'ignore' => [
       'resources/views/emails',
       'resources/views/markdown',
   ],
   

use HTMLMin\HTMLMin\Facades\HTMLMin;

echo HTMLMin::html('<div>   <p> Hello World! </p>   </div>');

use HTMLMin\HTMLMin\Http\Middleware\MinifyMiddleware;

Route::middleware([MinifyMiddleware::class])->group(function () {
    Route::get('/', function () {
        return view('welcome');
    });
});
bash
php artisan vendor:publish
bash
php artisan view:clear