Download the PHP package teknikhub/laravel-file-manager without Composer
On this page you can find all versions of the php package teknikhub/laravel-file-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download teknikhub/laravel-file-manager
More information about teknikhub/laravel-file-manager
Files in teknikhub/laravel-file-manager
Package laravel-file-manager
Short Description A filesystem-first, database-free File Manager and File Picker package for Laravel.
License MIT
Informations about the package laravel-file-manager
TeknikHub Laravel File Manager
A filesystem-first, database-free File Manager and File Picker package for Laravel. It provides a beautiful, responsive user interface built on Bootstrap 5 to seamlessly manage your files and folders, allowing for easy integration anywhere in your Laravel application.
Features
- Database-Free: Operates directly on your Laravel
Storagedisks. No database tables required. - Bootstrap 5 UI: A clean, modern, and responsive user interface built with standard Bootstrap 5.
- Multiple Disks: Supports seamlessly switching between multiple configured storage disks (e.g.,
public,s3,local). - File Picker Component: Easily integrate a file picker popup into your existing forms.
- Security First: Built-in protection against directory traversal attacks, mime-type spoofing, and dangerous file extensions (like
.php). - Dynamic Thumbnails: Generates thumbnails on the fly (supports both Intervention Image v2 and v3).
- Search & Filter: Instantly search through directories for files.
Requirements
- PHP >= 8.2
- Laravel >= 11.0
- Bootstrap 5 (for the UI to render correctly in your layouts)
Installation & Setup Guide (Step-by-Step)
Follow these simple steps to get the File Manager up and running in your Laravel project.
Step 1: Install via Composer
First, open your terminal, navigate to your Laravel project folder, and run this composer command to download the package:
Step 2: Publish Assets & Configuration
The package comes with its own CSS, JavaScript, and a configuration file. You need to "publish" these into your main Laravel application so the browser can load them.
Run this command in your terminal:
(Tip: Always use the --force flag when updating the package later to make sure you get the newest CSS/JS files!)
Step 3: Link Your Storage
Since the file manager deals with uploaded files, Laravel needs a symbolic link to make your storage/app/public folder accessible from the web.
Run this standard Laravel command:
Step 4: Configure Your Settings (Optional)
A new configuration file has been created at config/teknikhub-file-manager.php. Open this file to customize how the file manager works.
Here is a breakdown of the available configuration options:
Usage
1. Using as a Standalone Page
The package automatically registers routes under the prefix you specify in the config (default: /admin/file-manager). Simply navigate to that URL in your browser to use the full-page file manager.
2. Using as a Component in Blade
You can easily embed the File Manager directly into any Blade view using the provided component. This is perfect for embedding it inside a dashboard panel.
Note: Make sure Bootstrap 5 CSS and JS are loaded in the layout where you embed this component.
3. Using as a File Picker (Modal/Popup)
To use it as a file picker (e.g., for selecting an image for an input field in a form), include the component with the picker attribute set to true and define an onSelect callback.
Security considerations
Security is handled by restricting route access based on your application's middleware. Ensure you appropriately set the middleware array in config/teknikhub-file-manager.php (e.g., ['web', 'auth'] or an admin-specific middleware) to restrict who can access, upload, or delete files. The package inherently sanitizes all incoming paths to prevent directory traversal (../) attacks.
Testing
This package uses orchestra/testbench for testing.
To run the tests locally:
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-file-manager with dependencies
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/filesystem Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/view Version ^11.0|^12.0|^13.0