PHPackages                             jakovic/laravel-storage-explorer - 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. jakovic/laravel-storage-explorer

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

jakovic/laravel-storage-explorer
================================

A storage directory tree view with file management for Laravel applications.

v1.0.3(2mo ago)068↓100%MITPHPPHP ^8.1CI passing

Since Mar 5Pushed 2mo agoCompare

[ Source](https://github.com/sjakovic/laravel-storage-explorer)[ Packagist](https://packagist.org/packages/jakovic/laravel-storage-explorer)[ RSS](/packages/jakovic-laravel-storage-explorer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (5)Used By (0)

Laravel Storage Explorer
========================

[](#laravel-storage-explorer)

[![Laravel Version](https://camo.githubusercontent.com/06c36d6f4094e826a3200a6b142e7fb1272e3a3c3f0d16782e81952028996825/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d3130253230253743253230313125323025374325323031322d626c75652e737667)](https://packagist.org/packages/jakovic/laravel-storage-explorer)[![PHP Version](https://camo.githubusercontent.com/b3c2b3d34d328c2e11c56e1a62eb77ea1245960b3c8a875f7dc91cb019b02d56/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e312532422d3737374242342e737667)](https://packagist.org/packages/jakovic/laravel-storage-explorer)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](https://github.com/jakovic/laravel-storage-explorer/blob/main/LICENSE)

A visual file manager for Laravel storage. Browse directories, preview files, upload, download, and delete - all from a clean, responsive UI. Built with Blade + Alpine.js, zero external dependencies.

Screenshots
-----------

[](#screenshots)

[![Main window](screenshots/main-window.png)](screenshots/main-window.png)

[![Laravel log preview](screenshots/laravel-log.png)](screenshots/laravel-log.png)

[![Javascript file preview](screenshots/js-script.png)](screenshots/js-script.png)

[![New folder](screenshots/new-folder.png)](screenshots/new-folder.png)

[![Javascript file preview](screenshots/upload-file.png)](screenshots/upload-file.png)

Features
--------

[](#features)

- **Directory tree** with lazy-loading and expand/collapse
- **File preview** for text, code, JSON, CSV, images, and log files with color-coded severity levels
- **Tail preview** for large files (shows last 64KB instead of failing)
- **File upload** with drag &amp; drop and progress bar
- **Create folders** directly from the UI
- **File download** via signed URLs (5-minute expiry)
- **File and directory deletion** with confirmation
- **Search** across all files recursively
- **Two modes**: standalone page or embedded in your existing admin panel
- **Configurable**: disk, middleware, hidden patterns, blocked extensions, depth limits
- **Secure**: path traversal prevention, blocked dangerous uploads, signed downloads, CSRF protection
- **Zero dependencies** beyond Laravel itself (no Livewire, no npm build step)

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12

Installation
------------

[](#installation)

```
composer require jakovic/laravel-storage-explorer
```

The package auto-registers via Laravel's package discovery. No additional setup required.

Quick Start
-----------

[](#quick-start)

Visit `/storage-explorer` in your browser. Done.

Configuration
-------------

[](#configuration)

Publish the config to customize behavior:

```
php artisan vendor:publish --tag=storage-explorer-config
```

### All Options

[](#all-options)

```
return [
    // Which filesystem disk to browse (must exist in config/filesystems.php)
    'disk' => 'local',

    // Subdirectory within the disk to use as root (empty = disk root)
    'root_path' => '',

    // Standalone route settings
    'standalone' => [
        'enabled' => true,
        'prefix' => 'storage-explorer',
        'middleware' => ['web'],
    ],

    // Embedded mode: render inside your app's layout
    'layout' => null,               // e.g. 'layouts.admin'
    'content_section' => 'content', // @section name in your layout
    'page_title' => 'Storage Explorer',

    // Files hidden from the tree view
    'hidden_patterns' => ['.gitignore', '.gitkeep', '.DS_Store'],

    // File preview settings
    'preview' => [
        'max_size' => 2 * 1024 * 1024,  // 2 MB (full preview limit)
        'tail_size' => 64 * 1024,        // 64 KB (tail preview for large files)
        'max_lines' => 1000,
        'text_extensions' => ['txt', 'log', 'md', 'csv', 'json', 'xml', 'yml', ...],
        'image_extensions' => ['jpg', 'jpeg', 'png', 'gif', 'svg', 'webp', ...],
        'code_extensions' => ['php', 'js', 'ts', 'css', 'py', 'go', 'rs', ...],
    ],

    // Upload settings
    'upload' => [
        'enabled' => true,
        'max_size' => 10240, // KB
        'blocked_extensions' => ['php', 'phar', 'sh', 'exe', 'bat', 'cmd', 'com', 'msi'],
    ],

    // Delete settings
    'delete' => [
        'enabled' => true,
        'allow_directory_delete' => false,
    ],

    // Tree display
    'tree' => [
        'lazy_load' => true,
        'max_depth' => 20,
        'max_items_per_directory' => 500,
    ],
];
```

Protecting with Middleware
--------------------------

[](#protecting-with-middleware)

Add authentication middleware in the config:

```
'standalone' => [
    'middleware' => ['web', 'auth'],
],
```

Or use a gate for fine-grained access:

```
'standalone' => [
    'middleware' => ['web', 'auth', 'can:access-storage-explorer'],
],
```

Embedding in Your Admin Panel
-----------------------------

[](#embedding-in-your-admin-panel)

### Option 1: Config-based (recommended)

[](#option-1-config-based-recommended)

Set your layout in `config/storage-explorer.php`:

```
'layout' => 'layouts.admin',          // your existing layout
'content_section' => 'content-page',  // @yield() section name in your layout
'page_title' => 'Storage Explorer',
```

The package renders inside your layout with fully scoped CSS - no Tailwind CDN needed, no conflicts with Bootstrap or other frameworks.

### Option 2: Manual include

[](#option-2-manual-include)

In your Blade view:

```
{{-- In  --}}
@include('storage-explorer::partials.assets')

{{-- In body --}}
@include('storage-explorer::explorer', [
    'deleteEnabled' => true,
    'uploadEnabled' => true,
    'apiBase' => url('storage-explorer'),
])
```

**Important**: Keep `standalone.enabled = true` so the API routes are registered.

### Option 3: Custom routes

[](#option-3-custom-routes)

Register routes manually in your `routes/web.php` with your own middleware:

```
use Jakovic\StorageExplorer\StorageExplorer;

Route::middleware(['web', 'auth', 'admin'])->group(function () {
    StorageExplorer::routes('admin/storage');
});
```

Then set `standalone.enabled = false` in config to avoid duplicate routes.

Browsing Different Disks
------------------------

[](#browsing-different-disks)

By default the package browses the `local` disk. To browse other disks:

```
// Browse the public disk
'disk' => 'public',

// Browse S3 (read-only operations work, upload/delete depend on permissions)
'disk' => 's3',

// Browse a subdirectory only
'disk' => 'local',
'root_path' => 'uploads/documents',
```

Publishing Views
----------------

[](#publishing-views)

Customize the UI by publishing views:

```
php artisan vendor:publish --tag=storage-explorer-views
```

Views are published to `resources/views/vendor/storage-explorer/`.

Security
--------

[](#security)

The package includes multiple security layers:

- **Path traversal prevention** - rejects `..`, null bytes, URL-encoded traversal attempts
- **Signed download URLs** - 5-minute expiry, prevents unauthorized direct file access
- **Blocked upload extensions** - PHP, shell scripts, executables blocked by default
- **Configurable middleware** - add `auth`, gates, or custom middleware
- **CSRF protection** - all write operations require CSRF token
- **HTML escaping** - log file preview escapes content before highlighting

**Important**: The default configuration has no authentication. Always add auth middleware in production.

Testing
-------

[](#testing)

```
vendor/bin/phpunit
```

The test suite covers:

- Unit tests for `StorageService` (path validation, directory listing, search, file operations)
- Unit tests for `FileType` enum
- Feature tests for all API endpoints (tree, preview, search, upload, download, delete)
- Security tests (path traversal vectors, blocked extensions, signed URLs)

Contributing
------------

[](#contributing)

Contributions are welcome! Please open an issue or submit a pull request.

License
-------

[](#license)

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

Author
------

[](#author)

**Simo Jaković** - [jakovic.com](https://jakovic.com) - [GitHub](https://github.com/jakovic)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance87

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

4

Last Release

64d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/875abe04da697ad90f1d093b399bd424e7e0f688cf06ae684edc30ff4d185e3c?d=identicon)[sjakovic](/maintainers/sjakovic)

---

Top Contributors

[![sjakovic](https://avatars.githubusercontent.com/u/4011752?v=4)](https://github.com/sjakovic "sjakovic (4 commits)")

---

Tags

laravelstoragefile managerexplorerfile-browser

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jakovic-laravel-storage-explorer/health.svg)

```
[![Health](https://phpackages.com/badges/jakovic-laravel-storage-explorer/health.svg)](https://phpackages.com/packages/jakovic-laravel-storage-explorer)
```

###  Alternatives

[zing/laravel-flysystem-obs

Flysystem Adapter for OBS

1211.2k](/packages/zing-laravel-flysystem-obs)[mwguerra/filemanager

A full-featured file manager package for Laravel and Filament v5 with dual operating modes, drag-and-drop uploads, S3/MinIO support, and comprehensive security features.

718.5k1](/packages/mwguerra-filemanager)

PHPackages © 2026

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