Download the PHP package spatie/laravel-export without Composer

On this page you can find all versions of the php package spatie/laravel-export. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
spatie/laravel-export
Rate from 1 - 5
Rated 1.00 based on 3 reviews

Informations about the package laravel-export

Create a static site bundle from a Laravel app

Latest Version on Packagist Total Downloads

Build your blog or site with Laravel like with the tools you're used to having and export it to be hosted statically.

Laravel Export will scan your app and create an HTML page from every URL it crawls. The entire public directory also gets added to the bundle so your assets are in place too.

A few example use cases for this package:

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the package via composer:

After the package is installed, you can optionally publish the config file.

Configuration

Laravel Export doesn't require configuration to get started, but there are a few things you can tweak to your needs.

This means you can also use other filesystem drivers, so you could export your site straight to something like S3.

Determining the export contents

Crawling

With the default configuration, Laravel Export will crawl your site and export every page to a static site. If you'd like to disable this behaviour, disable the crawl option.

Paths

paths is an array of URL paths that will be exported to HTML. Use this to manually determine which pages should be exported.

Including files

include_files allows you to specify files and folders relative to the application root that should be added to the export. By default, we'll include the entire public folder.

exclude_file_patterns will check all source paths of included files, and exclude them if they match a pattern from in exclude_file_patterns. By default, all PHP files will be excluded, mainly to stop index.php from appearing in your export. Because the mix-manifest.json is no longer needed after compilation it is also excluded by default.

Configuration through code

All configuration options that affect the exports contents are also exposed in the Exporter class. You can inject this class to modify the export settings through code.

Custom disks

By default, Laravel Export will save the static bundle in a dist folder in your application root. If you want to store the site in a different folder, configure a new disk in config/filesystem.php.

Hooks

before and after hooks allow you to do things before or after an export. Hooks can contain any shell command.

The default configuration doesn't have any hooks configured, but shows two examples.

With this before hook, we'll use Yarn to build our assets before every export:

With this after hook, we'll deploy the static bundle to Netlify with their CLI tool after the export.

If you want to run an export without certain hooks, use --skip-{hook} flags.

To skip before, after and all hooks use the --skip-before, --skip-after, --skip-all flags respectively.

Usage

To build a bundle, run the export command:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

We publish all received postcards on our company website.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-export with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.8.1
illuminate/console Version ^10.0|^11.0
illuminate/contracts Version ^10.0|^11.0
illuminate/http Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0
nyholm/psr7 Version ^1.8.1
psr/http-message Version ^2.0
spatie/crawler Version ^8.1
symfony/console Version ^6.4.2|^7.0
symfony/dom-crawler Version ^6.0|^7.0
symfony/http-foundation Version ^6.4.2|^7.0
symfony/process Version ^6.4.2|^7.0
symfony/psr-http-message-bridge Version >=2.3.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package spatie/laravel-export contains the following files

Loading the files please wait ....