genealabs/nova-file-upload-field 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

genealabs/nova-file-upload-field

最新稳定版本:0.6.0

Composer 安装命令:

composer require genealabs/nova-file-upload-field

包简介

A Laravel Nova field.

关键字:

README 文档

README

GitHub (pre-)release Packagist GitHub license

File Upload Field for Laravel Nova

Supporting This Package

This is an MIT-licensed open source project with its ongoing development made possible by the support of the community. If you'd like to support this, and our other packages, please consider becoming a backer or sponsor on Patreon.

We thank the following sponsors for their generosity, please take a moment to check them out:

Impetus

I needed a file upload field for a few of my projects, with the versatile functionality that worked across all modern browsers in various use-cases. Safari has issues with drag-dropping URLs (it converts them to webloc files), different browsers have different little quircks in how they behave (Safari triggers change on input fields when they are updated programatically, Chrome does not in the case of changing files on a file input field).

Functionality

The following features set this form field appart from others:

  • drag-and-drop of URLs
  • drag-and-drop of links that point to files
  • drag-and-drop of web files (any web element with a src attribute that points to a file)
  • drag-and-dop of system files
  • image previews
  • any uploadable items (files, URLs, links) are available in the request as an UploadedFile object in Laravel's Request object

Installation

composer require genealabs/nova-file-upload-field

Usage

Add it as a field in your Nova resource, for example:

<?php namespace App\Nova;

use GeneaLabs\NovaFileUploadField\FileUpload;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Fields\Textarea;

class Image extends Resource
{
    public static $model = 'App\Image';
    public static $title = 'title';
    public static $search = [
        "id",
        "description",
        "title",
    ];

    public function fields(Request $request)
    {
        return [
            ID::make()
                ->sortable(),
            Text::make("Title", "title")
                ->sortable()
                ->rules("required", "max:255"),
            FileUpload::make("Image", "path")
                ->thumbnail(function ($image) {
                    return $image
                        ? asset($image)
                        : '';
                })
                ->disk("tenant")
                ->path("media")
                ->prunable(),
            Textarea::make("Description"),
        ];
    }
}

Commitment to Quality

During package development I try as best as possible to embrace good design and development practices, to help ensure that this package is as good as it can be. My checklist for package development includes:

  • ✅ Achieve as close to 100% code coverage as possible using unit tests.
  • ✅ Eliminate any issues identified by SensioLabs Insight and Scrutinizer.
  • ✅ Be fully PSR1, PSR2, and PSR4 compliant.
  • ✅ Include comprehensive documentation in README.md.
  • ✅ Provide an up-to-date CHANGELOG.md which adheres to the format outlined at http://keepachangelog.com.
  • ✅ Have no PHPMD or PHPCS warnings throughout all code.

Contributing

Please observe and respect all aspects of the included Code of Conduct https://github.com/GeneaLabs/laravel-model-caching/blob/master/CODE_OF_CONDUCT.md.

Reporting Issues

When reporting issues, please fill out the included template as completely as possible. Incomplete issues may be ignored or closed if there is not enough information included to be actionable.

Submitting Pull Requests

Please review the Contribution Guidelines https://github.com/GeneaLabs/laravel-model-caching/blob/master/CONTRIBUTING.md. Only PRs that meet all criterium will be accepted.

If you ❤️ open-source software, give the repos you use a ⭐️.

We have included the awesome symfony/thanks composer package as a dev dependency. Let your OS package maintainers know you appreciate them by starring the packages you use. Simply run composer thanks after installing this package. (And not to worry, since it's a dev-dependency it won't be installed in your live environment.)

genealabs/nova-file-upload-field 适用场景与选型建议

genealabs/nova-file-upload-field 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 45.65k 次下载、GitHub Stars 达 54, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「nova」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 genealabs/nova-file-upload-field 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 genealabs/nova-file-upload-field 我们能提供哪些服务?
定制开发 / 二次开发

基于 genealabs/nova-file-upload-field 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 45.65k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 54
  • 点击次数: 12
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 54
  • Watchers: 3
  • Forks: 7
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 未知