techlify / laravel-file-manager
为Laravel提供文件管理REST API的模块
0.1.1
2019-04-30 15:43 UTC
This package is not auto-updated.
Last update: 2024-09-26 18:36:30 UTC
README
这是一个简单的Laravel包,提供了文件管理RESTful API
安装
使用以下命令使用composer安装此包
composer require techlify-inc/file-manager
运行迁移
$ php artisan migrate
用法
现在您可以从前端使用API方法
POST techlify-files/upload - uploads a file to the Laravel code base and returns the name of the file
还有一个可以存储的完整文件数据库。以下信息可以在HTTP请求中发送并存储
owner_type - String, the type of model that owns this file. ex: Person if the file belongs to a person owner_id - id of the owner object title - a title for the file
以下是请求
POST techlify-files - stores a new file record GET techlify-files - gets a list of all stored files PUT techlify-files/{id} - updates a file record GET techlify-files/{id} - loads a single file record DELETE techlify-files/{id} - Deletes a file