PHPackages                             shamseer1997/laravel-file-viewer - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. shamseer1997/laravel-file-viewer

ActiveLibrary[File &amp; Storage](/categories/file-storage)

shamseer1997/laravel-file-viewer
================================

A basic file viewer for Laravel projects

v1.0.2(10mo ago)13MITJavaScriptPHP ^7.4|^8.0|^8.1|^8.2

Since Jun 24Pushed 10mo agoCompare

[ Source](https://github.com/shamseer1997/laravel-file-viewer)[ Packagist](https://packagist.org/packages/shamseer1997/laravel-file-viewer)[ Docs](https://github.com/shamseer1997/laravel-file-viewer)[ RSS](/packages/shamseer1997-laravel-file-viewer/feed)WikiDiscussions master Synced 1mo ago

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

🚀 Laravel File Viewer
=====================

[](#-laravel-file-viewer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/57848cd1909cc3a6568529290724bf53ce8ff3de19e643f55a1813759db37032/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f5368616d73656572313939372f6c61726176656c2d66696c652d7669657765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shamseer1997/laravel-file-viewer)[![Total Downloads](https://camo.githubusercontent.com/abe34cf25ae604a4db8ab40a22acfd999f7e30fb12e974a3f82d0aea54321c88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f5368616d73656572313939372f6c61726176656c2d66696c652d7669657765723f7374796c653d666c61742d73717561726526636f6c6f723d627269676874677265656e)](https://packagist.org/packages/shamseer1997/laravel-file-viewer)[![GitHub](https://camo.githubusercontent.com/64ea61fdd943866e32403818ce794052b148a0355449472330938a15d603f241/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f5368616d73656572313939372f6c61726176656c2d66696c652d7669657765723f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/64ea61fdd943866e32403818ce794052b148a0355449472330938a15d603f241/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f5368616d73656572313939372f6c61726176656c2d66696c652d7669657765723f7374796c653d666c61742d737175617265)[![GitHub Stars](https://camo.githubusercontent.com/ae1777a475bff5bf28ad0730ac2b6736f61c888284c35ba19bfcbe8e5229c472/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f5368616d73656572313939372f6c61726176656c2d66696c652d7669657765723f7374796c653d666c61742d737175617265)](https://github.com/shamseer1997/laravel-file-viewer/stargazers)

[![Laravel File Viewer](laravel-file-viewer.png)](laravel-file-viewer.png)

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

---

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

---

🚦 Features
----------

[](#-features)

- 📄 Preview images, videos, audio, PDF, DOCX, PPTX, XLSX, and more
- ⚡️ Super simple integration—just one line in your controller!
- 🎨 Customizable UI (publish and tweak the views)
- 🛡️ Secure: works with Laravel's storage disks
- 🌍 Multilingual ready

---

🛠️ Installation
---------------

[](#️-installation)

Install via Composer:

```
composer require shamseer1997/laravel-file-viewer
```

Publish assets:

```
php artisan vendor:publish --provider="shamseer1997\LaravelFileViewer\LaravelFileViewerServiceProvider" --tag=assets
```

Publish views (optional, for UI customization):

```
php artisan vendor:publish --provider="shamseer1997\LaravelFileViewer\LaravelFileViewerServiceProvider" --tag=views
```

---

🚀 Quick Start
-------------

[](#-quick-start)

Add the alias in your `config/app.php` (Laravel 10 and below):

```
'aliases' => Facade::defaultAliases()->merge([
    'LaravelFileViewer' => shamseer1997\LaravelFileViewer\LaravelFileViewerFacade::class,
])->toArray(),
```

### Example Controller

[](#example-controller)

```
use Illuminate\Http\Request;
use shamseer1997\LaravelFileViewer\LaravelFileViewer;

class FilePreviewController extends Controller
{
    public function filePreview($fileName){
        $filePath = $fileName;
        $disk = 'public';
        $fileUrl = asset('storage/' . $fileName);
        $fileData = [
            [
                'label' => __('Label'),
                'value' => "Value"
            ]
        ];
        return LaravelFileViewer::show($fileName, $filePath, $fileUrl, $disk, $fileData);
    }
}
```

Add a route in `routes/web.php`:

```
Route::get('/file-preview/{fileName}', [FilePreviewController::class, 'filePreview']);
```

---

🌟 Why Laravel File Viewer?
--------------------------

[](#-why-laravel-file-viewer)

- **Save hours**: No need to integrate multiple JS libraries yourself.
- **Modern UI**: Looks great out of the box.
- **Flexible**: Works with any Laravel storage disk.
- **Trusted**: Used in production by agencies and startups.

---

📈 Help Us Grow!
---------------

[](#-help-us-grow)

If you find this package useful:

- ⭐ Star this repo on GitHub
- 📦 Try it in your next Laravel project
- 💬 Share feedback and suggestions

---

📋 Changelog
-----------

[](#-changelog)

See [CHANGELOG](CHANGELOG.md) for recent updates.

---

🤝 Contributing
--------------

[](#-contributing)

PRs are welcome! See [CONTRIBUTING](CONTRIBUTING.md) for details. Questions? Email  or open an issue.

---

🔒 Security
----------

[](#-security)

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

---

👏 Credits
---------

[](#-credits)

- [Shamseer K](https://github.com/shamseer1997)
- [Vishal Sharma](https://github.com/vish4395)
- [meshesha/officetohtml](https://github.com/meshesha/officetohtml)
- [VolodymyrBaydalka/docxjs](https://github.com/VolodymyrBaydalka/docxjs)
- [All Contributors](../../contributors)

---

📄 License
---------

[](#-license)

MIT. See [License File](LICENSE.md) for details.

---

🎬 Demo
------

[](#-demo)

    AwesomeScreenshot-1\_2\_2023.1.32.27PM.mp4

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance53

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.6% 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 ~0 days

Total

3

Last Release

322d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d190b0c1267bd7069c09ae1abb582d04fe73824ae1aff3d2118cfd2b99d4652f?d=identicon)[Shamseer1997](/maintainers/Shamseer1997)

---

Top Contributors

[![vish4395](https://avatars.githubusercontent.com/u/12929023?v=4)](https://github.com/vish4395 "vish4395 (19 commits)")[![shamseer1997](https://avatars.githubusercontent.com/u/59552297?v=4)](https://github.com/shamseer1997 "shamseer1997 (4 commits)")

---

Tags

laravel-file-viewershamseer1997

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shamseer1997-laravel-file-viewer/health.svg)

```
[![Health](https://phpackages.com/badges/shamseer1997-laravel-file-viewer/health.svg)](https://phpackages.com/packages/shamseer1997-laravel-file-viewer)
```

###  Alternatives

[overtrue/laravel-filesystem-qiniu

A Qiniu storage filesystem for Laravel.

482229.7k16](/packages/overtrue-laravel-filesystem-qiniu)[rahulhaque/laravel-filepond

Use FilePond the Laravel way

261114.4k2](/packages/rahulhaque-laravel-filepond)[vish4395/laravel-file-viewer

A basic file viewer for Laravel projects

17324.5k](/packages/vish4395-laravel-file-viewer)[overtrue/laravel-filesystem-cos

A Cos storage filesystem for Laravel.

92128.4k7](/packages/overtrue-laravel-filesystem-cos)

PHPackages © 2026

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