1 - Install the Package with Composer
The first step is to install the package using composer. By default this will install the latest version of the package.
composer require renatomarinho/laravel-page-speed
2 - Publish Configuration File
Do publish the configuration file to change the settings whenever necessary. It will be handly for later so run the command below.
php artisan vendor:publish --provider="RenatoMarinho\LaravelPageSpeed\ServiceProvider"
3 - Enable the Optimization
To enable the optimization you just have to include the middleware for the necessary part that you want to optimize.
To learn more about the middleware details you can just head over to the documentation on GitHub page (Middleware Details).