Download the PHP package ranitachi/filemanager-laravel without Composer
On this page you can find all versions of the php package ranitachi/filemanager-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ranitachi/filemanager-laravel
More information about ranitachi/filemanager-laravel
Files in ranitachi/filemanager-laravel
Package filemanager-laravel
Short Description A secure, modular, and extensible File Manager for Laravel with RBAC, multi-storage, audit log, and WYSIWYG editor integration.
License MIT
Informations about the package filemanager-laravel
🗂 Laravel Secure File Manager
A secure, modular, and extensible File Manager package for Laravel 10/11/12/13.
Built as a drop-in replacement for unisharp/laravel-filemanager with enterprise-grade security, granular RBAC, multi-storage support, and native WYSIWYG editor integration.
✨ Features
| Feature | Details |
|---|---|
| 🔐 Security | Path traversal prevention, magic-byte MIME validation, signed URLs, ClamAV hook |
| 🗄 Multi-Storage | Local, S3, MinIO — swap via config, no code change |
| 👥 RBAC | Per-file / per-folder permissions for users and roles, with inheritance |
| 📋 Audit Log | Every action (upload, download, delete, move) is logged with IP and user-agent |
| 🖼 Thumbnails | Auto-generated via Intervention Image 3 (GD or Imagick) |
| ✂️ Full CRUD | Upload, rename, move, copy, soft-delete, restore, permanent delete |
| 🔗 Share Links | Temporary signed URLs with expiry, download limit, and optional password |
| 🧩 Editor Integration | CKEditor 5, TinyMCE, Summernote — single-file JS plugins included |
| 🎣 Event Hooks | FileUploaded, FileDeleted, FileDownloaded, FileMoved, FolderCreated |
| 📦 Artisan Commands | filemanager:install, filemanager:purge-trash |
| ⚡ Rate Limiting | Configurable upload rate limit per user/IP |
Requirements
- PHP 8.1+ for Laravel 10/11/12, PHP 8.3+ for Laravel 13
- Laravel 10.x, 11.x, 12.x, or 13.x
- Database MySQL 8.0+ / PostgreSQL 13+ / SQLite (testing)
- PHP Extensions
gdorimagick(for thumbnails),finfo(MIME detection)
Installation
1. Install via Composer
2. Run the installer
This publishes config, migrations, and assets — then runs migrations automatically.
3. Manual install (alternative)
Configuration
After publishing, edit config/filemanager.php:
.env Variables
API Reference
All API routes are prefixed with /api/v1/filemanager and require a Bearer token.
Files
| Method | Endpoint | Description |
|---|---|---|
GET |
/files |
Browse files (with folder_id, search, sort params) |
POST |
/upload |
Upload a file (multipart) |
GET |
/files/{id} |
Get file metadata |
GET |
/files/{id}/download |
Download file |
GET |
/files/{id}/preview |
Preview file (inline stream) |
PATCH |
/files/{id}/rename |
Rename file |
POST |
/files/{id}/move |
Move to another folder |
POST |
/files/{id}/copy |
Copy to another folder |
POST |
/files/{id}/restore |
Restore from trash |
DELETE |
/files/{id} |
Soft delete (pass permanent: true for hard delete) |
Folders
| Method | Endpoint | Description |
|---|---|---|
GET |
/folders |
Folder tree |
POST |
/folders |
Create folder |
PATCH |
/folders/{id} |
Rename folder |
DELETE |
/folders/{id} |
Delete folder |
Permissions
| Method | Endpoint | Description |
|---|---|---|
GET |
/{type}/{id}/permissions |
List permissions on file/folder |
POST |
/{type}/{id}/permissions |
Grant permission to user/role |
DELETE |
/permissions/{id} |
Revoke a specific permission |
Share Links
| Method | Endpoint | Description |
|---|---|---|
POST |
/files/{id}/share |
Create a share link |
DELETE |
/share/{token}/revoke |
Revoke a share link |
GET |
/share/{token} |
Public share page |
GET |
/share/{token}/download |
Public download |
Usage Examples
Via Facade
Granting Permissions
Creating a Share Link
Listening to Events
WYSIWYG Editor Integration
CKEditor 5
TinyMCE
Summernote
The picker opens as a popup window. When a file is selected, a callback fires in the parent window and automatically inserts the file URL into the editor.
Artisan Commands
Security
This package implements multiple layers of defence:
Upload Security
- MIME type validated with PHP
finfo(content-based, not extension-based) - Extension cross-checked against MIME whitelist to prevent spoofing
- Magic bytes checked (blocks
<?php,#!/, etc.) - Storage path is UUID-based — original filename is never used in the path
- Filename is sanitised (strips
../, null bytes, dangerous characters) - Optional ClamAV antivirus scan hook
Access Control
- All endpoints require authentication
- Permission resolution: Super Admin → Owner → Explicit User → Role → Inherited → Deny
- Permissions support expiry dates
- Rate limiting on upload endpoints (configurable)
Share Links
- 64-character random token
- Configurable expiry + download limit
- Optional password protection (bcrypt)
- Signed URL for local storage previews
Testing
The test suite uses PestPHP and an in-memory SQLite database. Storage is faked via Storage::fake().
Publishing to Packagist
- Update
composer.jsonsesuai vendor/package final Anda di Packagist - Push to a public GitHub repository
- Go to packagist.org/packages/submit and enter your repository URL
- Set up the GitHub webhook for auto-updates on new releases
Roadmap
- [ ] Chunked upload for large files (> 100 MB)
- [ ] File versioning with restore to previous version
- [ ] CDN integration (CloudFront, Cloudflare, BunnyCDN)
- [ ] Image optimization (auto-resize, WebP conversion)
- [ ] AI auto-tagging via OpenAI Vision / Gemini
- [ ] OCR text extraction (Tesseract / AWS Textract)
- [ ] Multi-tenant storage isolation
- [ ] Goravel (Go) port for high-throughput microservice
License
MIT © Fachran
All versions of filemanager-laravel with dependencies
illuminate/contracts Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/filesystem Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/cache Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/queue Version ^9.0|^10.0|^11.0|^12.0|^13.0