Skip to main content
SuperDoc works with Laravel + Blade + Vite. Laravel serves the Blade template with PHP, while Vite bundles the SuperDoc JavaScript.

Install

Vite config

vite.config.js

Blade template

Create a Blade view that loads the Vite-bundled script and mounts the editor:
resources/views/editor.blade.php

JavaScript entry point

resources/js/app.js

Route

routes/web.php

File upload handling

To load documents from a backend upload instead of the browser file picker, use a Laravel controller:
app/Http/Controllers/DocumentController.php
Then fetch the document URL in your JavaScript and pass it to SuperDoc:

Run

This runs php artisan serve (port 8000) and Vite’s dev server together. Open http://localhost:8000.

Next steps

Vanilla JS Integration

Plain JavaScript setup and patterns

Configuration

All configuration options

Laravel Example

Working Laravel example on GitHub

Collaboration

Real-time collaboration