Laravel Page Speed is a package by Renato Marinho to automatically optimize your site. Page Speed is inspired by Google's mod_pagespeed and offers the following options:
inline_cssshrinks external CSS files
elide_attributesRemoves unnecessary features from HTML tags
insert_dns_prefetchadds tags to HEAD to enable browser to pre-fetch DNS
remove_quotesRemoves unnecessary quotation marks from HTML tags
trim_urlsRemoves unnecessary prefixes from URLs
collapse_whitespaceRemoves unnecessary spaces in HTML
remove_commentsRemoves HTML comments
In the roadmap of the package,
combine_cssmerge multiple CSS files into a single file and do the same
Optimizations work by defining middleware software that you can group to apply to a route or route group for each rule.
You can run routes by defining them in the configuration file that came with the package:
'skip' => [
'*.pdf', // Ignore all routes with final .pdf
'*/downloads/*',// Ignore all routes that contain 'downloads'
To use this package and for more information, go to github laravel Page Speed