PHPackages                             radmen/lassy - 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. radmen/lassy

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

radmen/lassy
============

Lazy static site generator for Laravel4

1.1.0(12y ago)1130[2 issues](https://github.com/radmen/lassy/issues)MITPHPPHP &gt;=5.3.0

Since Jul 23Pushed 12y ago1 watchersCompare

[ Source](https://github.com/radmen/lassy)[ Packagist](https://packagist.org/packages/radmen/lassy)[ RSS](/packages/radmen-lassy/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

About
=====

[](#about)

[![Build Status](https://camo.githubusercontent.com/26548c4332f1d5a9dd187593250bb8fccd50f626e75cd5dc0d3c07d29eca8297/68747470733a2f2f6170692e7472617669732d63692e6f72672f7261646d656e2f6c617373792e706e67)](https://travis-ci.org/radmen/lassy)

Lassy is lazy static site generator. It means that every request (well not every.. check out [Filters section](#filters)) will generate a HTML file with its contents inside.

Every next request will be redirected to this file.

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

[](#installation)

Add `radmen/lassy` to `composer.json`:

```
{
  "require": {
    "radmen/lassy": "1.1.*"
   }
}
```

Then in `app/config/app.php` add:

- `'Radmen\Lassy\LassyServiceProvider'` to `providers`
- `'Lassy' => 'Radmen\Lassy\Facade'` to `aliases`

And publish config: `php artisan config:publish radmen/lassy`

Rewrites
--------

[](#rewrites)

Lassy only genereates HTML files. All requests must be rewrited to this files. Here are some example configs for such rewrites.

Note that `_static` is only example dirname. It can be changed in config file.

### Apache

[](#apache)

```
RewriteCond %{DOCUMENT_ROOT}/_static/%{REQUEST_URI} -f
RewriteRule ^(.*)$ /_static/$1 [QSA,PT,L]

RewriteCond %{DOCUMENT_ROOT}/_static/%{REQUEST_URI}/index.html -f
RewriteRule ^(.*)$ /_static/$1/index.html [QSA,PT,L]

```

### Laravel

[](#laravel)

If you have problem with server rewrites (it happens to me all the time) you can serve static files through Laravel application.

In `app/filters.php` add:

```
App::before(function($request)
{
  $path = Lassy::getFilePath($request);

  if(true === is_file($path))
  {
    Lassy::disable();
    return file_get_contents($path);
  }
});
```

Filters
=======

[](#filters)

In some situations static file should not be generated. That's where filters come in action.
Filter is closure which returns boolean. If it's `FALSE` Lassy will be disabled.

Lassy provides some basic filters:

- `Radmen\Lassy\Filter\AjaxRequest` checks if request is an AJAX call. If `TRUE` disable Lassy
- `Radmen\Lassy\Filter\GetRequest` enables Lassy only for `GET` requests
- `Radmen\Lassy\Filter\HtmlResponse` enables Lassy only for valid (`response code = 200`) HTML responses
- `Radmen\Lassy\Filter\QueriedRequest` disables Lassy when request has data in query

Filters can be specified in package config file.

Lassy can be enabled / disabled manually during the request. To do this run `Lassy::enable()`, or `Lassy::disable()` in your code.

Clearing files
==============

[](#clearing-files)

If you want to delete generated files just run `php artisan lassy:clear` in console.

License
=======

[](#license)

The Lassy package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~95 days

Total

4

Last Release

4440d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/488bdbbb3187d1f4f6d9c92f0c716ad413f5e7fe53d3ec5ffefb37cfcad4ecf6?d=identicon)[radmen](/maintainers/radmen)

---

Top Contributors

[![radmen](https://avatars.githubusercontent.com/u/1190255?v=4)](https://github.com/radmen "radmen (17 commits)")

---

Tags

laravelgeneratorstatic

### Embed Badge

![Health badge](/badges/radmen-lassy/health.svg)

```
[![Health](https://phpackages.com/badges/radmen-lassy/health.svg)](https://phpackages.com/packages/radmen-lassy)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M172](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M341](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M125](/packages/roots-acorn)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M132](/packages/laravel-mcp)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.3k453.6k30](/packages/tightenco-jigsaw)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
