PHPackages                             rabbit-loader/laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rabbit-loader/laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rabbit-loader/laravel
=====================

RabbitLoader for Laravel

v1.3.1(1y ago)084PHPPHP ^5.6 || ^7.0 || ^8.0

Since Jan 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rabbit-loader/laravel)[ Packagist](https://packagist.org/packages/rabbit-loader/laravel)[ RSS](/packages/rabbit-loader-laravel/feed)WikiDiscussions main Synced yesterday

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

RabbitLoader For Laravel
========================

[](#rabbitloader-for-laravel)

RabbitLoader Laravel package can be used to speed up any website that is built using Laravel framework.

Highlights
==========

[](#highlights)

- 🚀 Boost PageSpeed Insights Score for all pages of the Laravel website
- 🏗️ Automatically reduce image size by ~40% by converting to NextGen AVIF and WebP formats
- ➰ Lazy load below-the-fold images and YouTube videos
- 📱 Reduce CSS size by 98% automatically by generating critical-css for fastest rendering of the webpage
- ✨ Improve all Core Web Vitals metrics (lower FCP, FID, and CLS)
- ⚡️ Higher rankings on Google Search and better conversions due to page speed optimization and healthy Core Web Vitals metrics
- 🌐 Cache and serve static assets (CSS/JS/Images) via inbuilt premium CDN
- ♾️ HTTP/3 Full request and response multiplexing of static assets
- 🗜️ Use Brotli compression for static assets transfer and loading

Installation
============

[](#installation)

The package can be installed using Composer.

```
composer require rabbit-loader/laravel
```

Publish configuration file
--------------------------

[](#publish-configuration-file)

Run the below command to publish the vender assets and configurations.

```
php artisan vendor:publish --provider='RabbitLoader\Laravel\RLServiceProvider'
```

Add Middleware
--------------

[](#add-middleware)

In the app/Http/Kernel.php file, add the RabbitLoader middleware.

```
//app/Http/Kernel.php

protected $middleware = [
    ...
    \RabbitLoader\Laravel\Process::class
    ...
]
```

Configuration
=============

[](#configuration)

The configuration file can be found under the Laravel project installation directory `config/rabbitloader.php`

Below is a sample configuration file. The configuration items are self explanatory.

```
