PHPackages                             antlur/laravel-static-export - 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. antlur/laravel-static-export

ActiveLibrary

antlur/laravel-static-export
============================

Export your laravel site as static files

v0.1.2(2y ago)361MITPHPPHP ^8.1

Since Feb 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/antlur/laravel-static-export)[ Packagist](https://packagist.org/packages/antlur/laravel-static-export)[ Docs](https://github.com/antlur/laravel-static-export)[ GitHub Sponsors](https://github.com/Antlur)[ RSS](/packages/antlur-laravel-static-export/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (12)Versions (4)Used By (0)

Export your laravel site as static files
========================================

[](#export-your-laravel-site-as-static-files)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cf6950975bdaf8b467a671474767b4a1c4895eb801f9ae73bde4e93e7acdc7f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e746c75722f6c61726176656c2d7374617469632d6578706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/antlur/laravel-static-export)[![GitHub Tests Action Status](https://camo.githubusercontent.com/5df05a72dad2c3015cdcba74fceb6f0f9862786044132eead4a37e229b7c8557/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616e746c75722f6c61726176656c2d7374617469632d6578706f72742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/antlur/laravel-static-export/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ea93cfd4a43d44e29266cca3633809215c84532994e4778673a70211a09d80cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616e746c75722f6c61726176656c2d7374617469632d6578706f72742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/antlur/laravel-static-export/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/c5764e515e10de7fcd23cf84a1e36eef930f485fdf0d20ab8e13a42b3bd65def/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e746c75722f6c61726176656c2d7374617469632d6578706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/antlur/laravel-static-export)

Host your Laravel site on Netlify, Vercel, or any other static site host. This package will generate static files from your Laravel site with very little setup. A convenient attribute is provided to provide routes with dynamic parameters.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require antlur/laravel-static-export
```

You can publish the config file with:

```
php artisan vendor:publish --tag="static-export-config"
```

This is the contents of the published config file:

```
return [
    'output_path' => base_path('dist'),

    'clear_before_export' => true,
];
```

Usage
-----

[](#usage)

```
php artisan export
```

Dynamic Data during static site generation
------------------------------------------

[](#dynamic-data-during-static-site-generation)

When generating the static site, you can use the ExportPaths attribute to define which routes should be generated. This is useful when you have dynamic data that you want to generate static pages for. For example, if you have a blog and you want to generate static pages for each blog post, you can use the ExportPaths attribute to define which routes should be generated. The rest of your logic can be handled as if it was a normal Laravel application.

```
// web.php
Route::get('/blog/{slug}', [BlogController::class, 'show']);

// app/Http/Controllers/BlogController.php
use Antlur\Export\Attributes\ExportPaths;

class BlogController
{
    // You can pass a class that implements PathProvider
    #[ExportPaths(BlogPostPaths::class)]
    public function show(string $name)
    {}

    // Or you can pass an array of paths directly
    #[ExportPaths(['/blog/first-post', '/blog/second-post'])]
    public function show(string $name)
    {}
}

// app/PathProviders/BlogPostPaths.php
class BlogPostPaths implements \Antlur\Export\Contracts\PathProvider
{
    public function paths(): array
    {
        return [
            '/blog/first-post',
            '/blog/second-post',
        ];
    }
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Anthony Holmes](https://github.com/anthonyholmes)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.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 ~1 days

Total

3

Last Release

805d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82a9fadc66ebfa83e57fae46f128df070657e7a14000170fb17d429ffaac5182?d=identicon)[anthonyholmes](/maintainers/anthonyholmes)

---

Top Contributors

[![anthonyholmes](https://avatars.githubusercontent.com/u/3069151?v=4)](https://github.com/anthonyholmes "anthonyholmes (18 commits)")[![lopadz](https://avatars.githubusercontent.com/u/42697065?v=4)](https://github.com/lopadz "lopadz (1 commits)")

---

Tags

laravelAntlurlaravel-static-export

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/antlur-laravel-static-export/health.svg)

```
[![Health](https://phpackages.com/badges/antlur-laravel-static-export/health.svg)](https://phpackages.com/packages/antlur-laravel-static-export)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[mozex/laravel-scout-bulk-actions

A Laravel Scout extension for bulk importing and flushing of all models.

1033.4k](/packages/mozex-laravel-scout-bulk-actions)

PHPackages © 2026

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