PHPackages                             aculix99/laravel-quick-static - 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. [Caching](/categories/caching)
4. /
5. aculix99/laravel-quick-static

ActiveLibrary[Caching](/categories/caching)

aculix99/laravel-quick-static
=============================

Serve static html, json and xml files without booting laravel for best performance

1.0.5(5mo ago)110MITPHPPHP ^8.0

Since Oct 10Pushed 5mo agoCompare

[ Source](https://github.com/AcuLix99/Laravel-Quick-Static)[ Packagist](https://packagist.org/packages/aculix99/laravel-quick-static)[ RSS](/packages/aculix99-laravel-quick-static/feed)WikiDiscussions main Synced 1mo ago

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

- [Introduction](#introduction)
- [Installation](#installation)
    - [Install with Composer](#install-with-composer)
    - [.gitingore](#gitingore)
    - [URL Rewriting](#url-rewriting)
        - [Snippet](#snippet)
        - [Full file as reference](#full-file-as-reference)
- [Configuration](#configuration)
    - [Publish config file](#publish-config-file)
    - [Cache config file](#cache-config-file)
    - [Composer](#composer)
    - [Customizations](#customizations)
- [Usage](#usage)
    - [Using the middleware](#using-the-middleware)
    - [Clearing the cache](#clearing-the-cache)
    - [Optimization](#optimization)
- [License](#license)

[![Latest Version on Packagist](https://camo.githubusercontent.com/48c3f5639bcdf93329452cdd1610e3771ba023567687a2ca682231254b6a69a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6163756c697839392f6c61726176656c2d717569636b2d7374617469632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aculix99/laravel-quick-static)[![Total Downloads](https://camo.githubusercontent.com/fcd1cc1961e896eaaaf888761e9ba9c74249cdcf8776e59e3c47c0ed93ad57ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6163756c697839392f6c61726176656c2d717569636b2d7374617469632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aculix99/laravel-quick-static)

Introduction
============

[](#introduction)

This package allows you to serve static html, json and xml files without booting laravel for best performance! It's inspired by [page-cache](https://github.com/JosephSilber/page-cache).

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

[](#installation)

Install with Composer
---------------------

[](#install-with-composer)

```
composer require aculix99/laravel-quick-static
```

.gitingore
----------

[](#gitingore)

- Add the cache folder name (default = `_quick-static`) to your `.gitingore` to avoid cached files in your vcs

URL Rewriting
-------------

[](#url-rewriting)

### Snippet

[](#snippet)

Add these lines to the `public/index.php` of your laravel application right after the use statements:

```
define('QUICK_STATIC_ROOT', __DIR__);
require __DIR__ . '/../vendor/aculix99/laravel-quick-static/loader.php';
```

### Full file as reference

[](#full-file-as-reference)

Your full index.php will then look like this:

```
