emmaogunwobi/filemanager
最新稳定版本:v2.1.0
Composer 安装命令:
composer require emmaogunwobi/filemanager
包简介
A file upload and management package for Laravel
README 文档
README
Welcome to the File Manager package for the Laravel project. This package provides functionalities to manage files within the application.
Features
- Upload files
- Download files
- Delete files
- List files
Installation
To install the package, run:
composer require emmaogunwobi/filemanager
php artisan vendor:publish --provider="Emmaogunwobi\FileManager\FileManagerServiceProvider" --tag=config
php artisan migrate
Usage
Import the package and use the provided methods to manage files
Add the following to the config/app.php file to activate the Facade service
'aliases' => [ // ... 'FileManager' => Emmaogunwobi\FileManager\Facades\FileManager::class, ],
You can use via the Dependency Injection
use Emmaogunwobi\FileManager\Services\FileManagerService; class SomeController extends Controller { protected $fileManager; public function __construct(FileManagerService $fileManager) { $this->fileManager = $fileManager; } public function someMethod() { $result = $this->fileManager->upload('/path/to/file.jpg'); // Do something with $result } }
or via the Facade
use FileManager; // Assuming you've set up the alias class SomeController extends Controller { public function someMethod() { $result = FileManager::upload('/path/to/file.jpg'); // Do something with $result } }
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MIT License.
统计信息
- 总下载量: 70
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-25