定制 tadasei/backend-file-management 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tadasei/backend-file-management

最新稳定版本:v2.7.3

Composer 安装命令:

composer require tadasei/backend-file-management

包简介

A package that provides stubs for managing file associations with models

README 文档

README

This package provides stubs for managing files in the backend of a Laravel application. It aims to simplify and streamline common Store, Update and Delete file operations by providing pre-defined structures.

Features

  • Quickly generate file management migrations, models, validation rules and handling logic.
  • Customize and extend generated code to fit your project's needs.
  • Improve development efficiency by eliminating repetitive tasks.

Installation

You can install the package via Composer by running:

composer require tadasei/backend-file-management --dev

Usage

Publishing file management utilities

To publish file management utilities, use the following command:

php artisan file-management:install

Integration with HandleCors Middleware

The package also provides a route file, controller, and policy to help integrate Laravel's built-in HandleCors middleware with the storage directory's files. This allows you to manage cross-origin file requests and ensure smooth file handling across different domains.

To publish the HandleCors middleware integration files, add the --with-cors flag to the command:

php artisan file-management:install --with-cors

The following files will be generated:

  • Route: routes/resources/file.php
  • Controller: app/Http/Controllers/FileController.php
  • Policy: app/Policies/FilePolicy.php

By default:

  • The generated routes are guarded by the auth:sanctum middleware.
  • The FileController's download method is authorized using the FilePolicy.
  • The FilePolicy's download method is pre-configured to return true, granting access to file downloads.

You can customize the route file, controller, and policy to fit your project's specific requirements and security policies.

Customization

The generated code serves as a starting point. You can customize and extend it according to your project's requirements. Modify the generated migrations, models, traits and validation rules as needed.

Contributing

Contributions are welcome! If you have suggestions, bug reports, or feature requests, please open an issue on the GitHub repository.

License

This package is open-source software licensed under the MIT license.

统计信息

  • 总下载量: 152
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固