Download the PHP package vish4395/laravel-file-viewer without Composer

On this page you can find all versions of the php package vish4395/laravel-file-viewer. 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?
vish4395/laravel-file-viewer
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package laravel-file-viewer

🖼️ Laravel File Viewer

Latest Version on Packagist Total Downloads GitHub GitHub Stars Twitter URL

Laravel File Viewer is the easiest way to preview images, videos, audio, PDF, DOCX, PPTX, XLSX, CSV, and more in your Laravel app. Instantly add beautiful file previews to your admin panels, dashboards, or user portals — with zero configuration required.


✨ Loved by developers. Easy to install. Works out of the box.


🚦 Features


📋 Requirements


🛠️ Installation

Install via Composer:

Publish the assets (required):

Publish the config (optional):

Publish views for UI customization (optional):


🚀 Quick Start

The package is auto-discovered in Laravel 11+. No manual provider or alias registration needed.

Example Controller

Add a route in routes/web.php:

LaravelFileViewer::show() Parameters

Parameter Type Default Description
fileName string Display name for the file
filePath string Path relative to the storage disk
fileUrl string Public URL used to render the preview
disk string\|null 'public' Laravel storage disk (overrides config default)
fileData array [] Key/value pairs displayed in the details panel

⚙️ Configuration

After publishing the config (config/laravel-file-viewer.php), you can customize behavior via environment variables or directly in the config file.

Environment Variables

Variable Default Description
FILE_VIEWER_DISK public Default storage disk
FILE_VIEWER_GOOGLE_FALLBACK false Use Google Docs Viewer as fallback
FILE_VIEWER_TOOLBAR_DOWNLOAD true Show download button
FILE_VIEWER_TOOLBAR_NEW_TAB true Show "open in new tab" button
FILE_VIEWER_TOOLBAR_COPY_LINK true Show copy link button
FILE_VIEWER_TOOLBAR_FULLSCREEN true Show fullscreen button

📂 Supported File Types

Category Types Viewer
Images JPEG, PNG, GIF, WebP, SVG, etc. Native <img>
Video MP4, WebM, OGG, etc. Native <video>
Audio MP3, WAV, OGG, etc. Native <audio>
PDF .pdf Embedded PDF viewer
Word .docx, .doc docx-preview.js
Excel .xlsx, .xls SheetJS
PowerPoint .pptx, .ppt Office Online / iframe
CSV .csv Inline table
Text .txt, .log, .md, .json Syntax-highlighted text
Archives .zip, .rar, .tar, .gz Details panel
Other Any unsupported type Office Online or Google Docs Viewer (if enabled)

🌟 Why Laravel File Viewer?


📈 Help Us Grow!

If you find this package useful:


📋 Changelog

See CHANGELOG for recent updates.


🤝 Contributing

PRs are welcome! See CONTRIBUTING for details. Questions? Email [email protected] or open an issue.


🔒 Security

If you discover any security issues, please email [email protected] instead of using the issue tracker.


👏 Credits


📄 License

MIT. See License File for details.


🎬 Demo

https://user-images.githubusercontent.com/12929023/210215225-000507cf-d8f4-4e5b-b7ad-ad6a2276ac93.mp4


⭐ Star History

Star History

Star History Chart



All versions of laravel-file-viewer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
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 vish4395/laravel-file-viewer contains the following files

Loading the files please wait ...