spatie/laravel-export
Export a Laravel app as a static site bundle. Crawls your routes, renders HTML for each discovered URL, and copies the public directory so assets are included. Ideal for blogs and marketing sites hosted on Netlify or any static hosting.
/about, /pricing) to serve during outages.Adopt if:
Look elsewhere if:
*"This package lets us combine the best of Laravel’s flexibility with the speed and cost-efficiency of static hosting. By exporting read-heavy routes (e.g., blogs, docs) to static HTML, we can:
Example: Our blog currently costs $50/month on Forge. With this, we’d pay ~$10/month for static hosting while keeping Laravel for admin tools. No code changes required for static routes."*
*"Laravel Export is a lightweight way to generate static HTML from your Laravel app’s routes, with these key benefits:
public folder (CSS/JS/images) by default.yarn build, deploy to Netlify, or trigger notifications via before/after commands.--streaming.Use cases:
/blog/* to Netlify while keeping /admin dynamic.php artisan export --paths=/pr/123).Trade-offs:
/dashboard).Proposal:
/blog and host on Netlify).main branch pushes.Alternatives considered:
How can I help you explore Laravel packages today?