百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

filemanager

> 编程语言
开源

一个简单、友好且实用的 Livewire 文件管理器,可用于您的应用程序

363 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个简单、友好且实用的 Livewire 文件管理器,可用于您的应用程序

Livewire Filemanager

A simple, friendly, and practical file manager designed specifically for Laravel applications. This Livewire-powered tool makes it easy to manage files and folders within your project, offering an intuitive interface and seamless integration with Laravel's ecosystem. Perfect for developers seeking an efficient and user-friendly solution for file and folders management.

  • Drag & drop files
  • Search for files or folders
  • Ready to include in any projects
  • Multiple languages (see resources/lang for the list)
  • Darkmode available
  • API endpoints

Watch the presentation of the package here: Laravel Switzerland Meetup

Full Documentation - Comprehensive guide with detailed examples, API reference, and advanced usage.

Project requirements

  • PHP 8.2.0 or greater required

Important composer dependencies

  • livewire/livewire
  • spatie/laravel-medialibrary

Installation

[!IMPORTANT] This package is still in development and its structure can change until a stable version is released. Use with caution in you projects. Additionally, the file manager does not include any security layers to protect uploaded documents. You are responsible for controlling access where you install the package and securing your files and folders.

You can install the package via composer:

bash
composer require livewire-filemanager/filemanager

Publish the package's migration file:

bash
php artisan vendor:publish --tag=livewire-filemanager-migrations

This package relies on spatie/medialibrary to handle the medias, so if you haven't already configured the package, don't forget this step:

bash
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-migrations"

If you need for informations about the spatie/medialibrary package, please visit their documentation

[!NOTE] Thumbnails When you upload images, the package will generate a thumbnail. By defaults, it will be dispatched into the queues. You'll have to launch the workers inside your app or change the QUEUE_CONNECTION value in your .env file

After that, you need to run migrations.

bash
php artisan migrate

This will create a folders table which will hold all the filemanager structure and a media table if not already present.

Package configuration

Next, you'll need to use the `` component where you want to place the filemanager.

For the styles and scripts, the package relies on TailwindCSS and AlpineJS. So if you don't already have them installed, you can include the @filemanagerScripts and @filemanagerStyles.

xml

    @filemanagerStyles

    

    @filemanagerScripts

[!IMPORTANT] The @filemanagerStyles will include the PLAY CDN from TailwindCSS which is not recommended for production. Instead, prefer including the path inside your tailwind config file.

Tailwind version 4, in your app.css

javascript
@source '../../vendor/livewire-filemanager/filemanager/resources/views/**/*.blade.php';

Tailwind version 3, in your tailwind.config.js

javascript
module.exports = {
    content: [
        './resources/**/*.blade.php',
        './vendor/livewire-filemanager/filemanager/resources/views/**/*.blade.php',
    ],
}

If you intend to give access to your files with the public, you can add this inside your web routes file:.

Route::get('{path}', [FileController::class, 'show'])->where('path', '.*')->name('assets.show');

And don't forget to import the FileController class:

use LivewireFilemanager\Filemanager\Http\Controllers\Files\FileController;

This will give you an endpoint where you can reach the files with a direct url.

Inside the filemanager, when you click on a file, you'll have the possibility to copy the url to the file. In order to work correctly, this feature needs to have your domain with https enabled.

The interface

Once everything is installed, the interface should look like this:

The whole interface is available in dark/light mode.

ACL Configuration

If you want to enable ACL, you should publish the config file:

bash
php artisan vendor:publish --tag=livewire-filemanager-config

This will create a livewire-filemanager.php file inside your config folder. You can now enable the ACL by changing the acl_enabled value to true.

Also publish the Spatie medialibrary config file, if you haven't already done it.

bash
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-config"

In the media-library config file, change the media_model value to LivewireFilemanager\Filemanager\Models\Media. If you already have a media model, you can use the Trait LivewireFilemanager\Filemanager\Traits\HasMediaOwner inside your model.

This will ensure that only users who created files can view them.

API Integration

The package includes a comprehensive REST API for programmatic file and folder management. The API provides endpoints for:

  • Folder CRUD operations (create, read, update, delete)
  • File upload and management
  • Bulk file operations
  • Authentication and authorization support

API endpoints are available under the /api/filemanager/v1/ prefix and require authentication via Laravel Sanctum. The API can be enabled/disabled and configured through the package configuration file. If upgrading the package, you may update the config file as well inside your project.

Testing

bash
composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

All contributions are welcome and will be fully credited.

Please see CONTRIBUTING for details.

Credits

  • Yves Engetschwiler
  • All illustrations are made by Quetzal Graphic Design
  • All Contributors

License

The MIT License (MIT). Please see License File for more information.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHP

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言