akbsit/nova-field-system-file
最新稳定版本:1.0.10
Composer 安装命令:
composer require akbsit/nova-field-system-file
包简介
Uploading files to the server from nova.
README 文档
README
Install
To install package, you need run command:
composer require akbsit/nova-field-system-file
Next install migrations:
php artisan migrate
Connection
Package based on akbsit/laravel-system-file in repository which describes the connection to the model.
Examples
Second parameter is responsible for the collection to which the saved images or files will belong.
- Upload image:
public function fields(HttpRequest $oHttpRequest) { return [ Image::make(__('Image'), 'image'), ]; }
- Upload file:
public function fields(HttpRequest $oHttpRequest) { return [ File::make(__('File'), 'file'), ]; }
- Fields support validation via the method
rules:
public function fields(HttpRequest $oHttpRequest) { return [ Image::make(__('Image'), 'image') ->rules('required', 'max:1000'), File::make(__('File'), 'file') ->rules('required', 'max:5000'), ]; }
Methods and properties
enablePartition()- enable folder generation (example:73c/d53/dce);setOriginFileName(string $sOriginFileName)- set origin file name;setFileName(string $sFileName)- set file name;toDir(string $sDir)- set storage folder (by defaultdefault);self()- specified if the modelSystemFile(by defaultfalse).
统计信息
- 总下载量: 38
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-17