承接 rabbit-loader/laravel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rabbit-loader/laravel

最新稳定版本:v1.3.1

Composer 安装命令:

composer require rabbit-loader/laravel

包简介

RabbitLoader for Laravel

README 文档

README

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

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

The package can be installed using Composer.

composer require rabbit-loader/laravel

Publish configuration file

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

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

Add Middleware

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

//app/Http/Kernel.php

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

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.

<?php

return [

    // boolean - sets RabbitLoader optimization
    'active' => env('RABBIT_LOADER_ACTIVE', true),

    //boolean - if true, RL will work in me(private) mode. production ready app should have this value false
    'meMode' => env('RABBIT_LOADER_ME_MODE', false),

    //set the license key here if you can not use .env file.
    'licenseKey' => env('RABBIT_LOADER_LICENSE_KEY', ''),

    //directory where cached files can be stored
    'cacheDir' => env('RABBIT_LOADER_CACHE_DIR', '/tmp'),

    //skip RabbitLoader for these paths
    'skipPaths' => ['/my-admin*', '/some-path'],

    //skip RabbitLoader is these cookie keys are present
    'skipCookies' => ['user_id'],

    //these parameters will be ignored when looking for cached data. Analytics parameters are good fit here because they do not affect the backend page structure
    'ignoreParams' => ['utm_source', 'utm_medium',],
];

Config Cache

If you change configuration on environment variables, its a good idea to clear the cached content using the below command -

php artisan config:clear

License Key

A license key is required to run the SDK. This guide explains how to get the license key. After getting the license key, you can keep it in the .env file

RABBIT_LOADER_LICENSE_KEY='license key goes here'

Support

Contact RabbitLoader team here.

统计信息

  • 总下载量: 84
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-01-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固