PHPackages                             davekelly/static-generator - 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. davekelly/static-generator

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

davekelly/static-generator
==========================

Generate static HTML/JSON files from Laravel routes

v0.2.0(11y ago)142124[1 issues](https://github.com/davekelly/static-generator/issues)MITPHPPHP &gt;=5.4.0

Since Aug 20Pushed 6y ago3 watchersCompare

[ Source](https://github.com/davekelly/static-generator)[ Packagist](https://packagist.org/packages/davekelly/static-generator)[ RSS](/packages/davekelly-static-generator/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Static Generator (Laravel 4.2)
==============================

[](#static-generator-laravel-42)

Generate static HTML or JSON files from Laravel routes.

This was developed for use with small data visualisation-type applications where it is not required to deploy a full PHP app with a database. Instead, a front-end-only version with data held as JSON can be used. I have needed to use HTML-only versions of Laravel apps often enough that this package made sense.

Setup &amp; Usage
-----------------

[](#setup--usage)

### Installation

[](#installation)

- Add `'Davekelly\StaticGenerator\StaticGeneratorServiceProvider',` to the end of the `providers` array in `/app/config/app.php`
- You will need to create a writable directory at `/public/static` - this is where the static files are placed

### Usage

[](#usage)

Usage is through a front-end interface. The package adds a route to `/generate` where you will find this interface.

If you generate a static version of a Route that returns a JSON response, the file will have a `.json` extension, otherwise, it will be `.html`.

- Visit `http://your.domain/generate` to see a list of Routes registered in your application
- Click the button next to the Route you'd like to generate a static file for
- If successful, the `.html` or `.json` file will be stored in `/public/static` - you'll be shown a confirmation message with the location &amp; file-name.

Uses
----

[](#uses)

- [Guzzle](http://guzzlephp.org)
- Front-end bootstrap styling via the [MaxCDN Bootstrap CDN](http://www.bootstrapcdn.com/)

Future To-Do's / Improvements
-----------------------------

[](#future-to-dos--improvements)

- Create an Artisan CLI interface
- Look at filtered routes

Updates
-------

[](#updates)

v0.2 - Creates html nested directories mimicking route structure (e.g. route: `/about/contact` saved to `/static/about/contact/index.html`) - based on idea from [pulkitjalan](https://github.com/pulkitjalan/static-generator/blob/3cb252c846fc00f4b0c862813d8f2f97e7476fa0/src/Davekelly/StaticGenerator/Generator.php)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~17 days

Total

3

Last Release

4300d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/109402?v=4)[Dave Kelly](/maintainers/davekelly)[@davekelly](https://github.com/davekelly)

---

Top Contributors

[![davekelly](https://avatars.githubusercontent.com/u/109402?v=4)](https://github.com/davekelly "davekelly (11 commits)")[![AppSynergy](https://avatars.githubusercontent.com/u/3657244?v=4)](https://github.com/AppSynergy "AppSynergy (1 commits)")

---

Tags

laravelhtmlstaticfront-end

### Embed Badge

![Health badge](/badges/davekelly-static-generator/health.svg)

```
[![Health](https://phpackages.com/badges/davekelly-static-generator/health.svg)](https://phpackages.com/packages/davekelly-static-generator)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.0k](/packages/craftcms-cms)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k90](/packages/nativephp-mobile)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)

PHPackages © 2026

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