vrkansagara / LaraOutPress by vrkansagara

23,454
65
2
Package Data
Maintainer Username: vrkansagara
Maintainer Contact: vrkansagara@gmail.com (Vallabh Kansagara)
Package Create Date: 2016-06-14
Package Last Update: 2023-06-17
Home Page: https://vrkansagara.in/
Language: PHP
License: BSD-3-Clause
Last Refreshed: 2024-11-19 03:23:52
Package Statistics
Total Downloads: 23,454
Monthly Downloads: 158
Daily Downloads: 10
Total Stars: 65
Total Watchers: 2
Total Forks: 12
Total Open Issues: 1

LaraOutPress (Laravel Output Press)

This is simply compress your final out of Larvel Application and serve to the browser.

How to install

	composer require vrkansagara/lara-out-press

How to activate this compression middleware in your application

Add the ServiceProvider to the providers array in config/app.php

 Vrkansagara\LaraOutPress\ServiceProvider::class,

Copy the package config to your local config with the publish command:

php artisan vendor:publish --provider="Vrkansagara\LaraOutPress\ServiceProvider"

Enable on single environment .env

      VRKANSAGARA_COMPRESS_ENVIRONMENT='${APP_ENV}' 

Enable on multiple environment .env

      VRKANSAGARA_COMPRESS_ENVIRONMENT='prod,testing,dev,local' 

Enable this compressor by placing bellow code in .env file.

    VRKANSAGARA_COMPRESS_ENABLED = true

Display usage on each page.

Set $debug = 1; in AfterMiddleware.php

TO Do List

  • [x] Compress browser output.
  • [] Combine all CSS
  • [] Combine all JavaScript files.
  • [] Compress using varis algorithms.
  • [] Versioning the compressed file.
  • [] Except route(s),middleware,group,prefix

Task

  • [x] Add analytics before compress and after compress.
  • [x] Migrate code to laravel package format.

Code Assumption

This code is developed with the mind set of each request is filtered by this middleware. So most of the code will not be flexi.

Improvement and suggestion are always welcome.