定制 meghdadfadaee/nova-form-card 二次开发

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

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

meghdadfadaee/nova-form-card

Composer 安装命令:

composer require meghdadfadaee/nova-form-card

包简介

Submit-capable Laravel Nova 5 cards built with standard Nova fields.

README 文档

README

Submit-capable Laravel Nova 5 cards powered by standard Nova fields.

nova-form-card gives Nova cards an Action-like flow: define fields, validate input, submit to a card endpoint, run handle(), and return a structured response.

Nova Form Card demo

Why

Nova cards are great for dashboards, but they are usually display-only. This package lets you build reusable form cards without creating a Nova resource page or a custom tool.

Features

  • Use native Nova fields inside a card
  • Submit data to a package route
  • Validate with Nova field rules() / creationRules()
  • Receive values through FormFields
  • Show validation errors beside fields
  • Support dependsOn(), uploads, loading state, custom submit text, and authorization
  • Return success, error, redirect, or refresh responses
  • Render display-only Nova fields such as Badge, Heading, Stack, Status, and Sparkline

Requirements

  • PHP ^8.2
  • Laravel ^11|^12|^13
  • Laravel Nova ^5

Installation

composer require meghdadfadaee/nova-form-card

Laravel auto-discovers the service provider.

Optional publishes:

php artisan vendor:publish --tag=nova-form-card-config
php artisan vendor:publish --tag=nova-form-card-translations

Quick Look

class InviteUserCard extends FormCard
{
    public function fields(NovaRequest $request): array
    {
        return [
            Text::make(__('Email'))->rules('required', 'email'),
        ];
    }

    public function handle(FormFields $fields, NovaRequest $request): mixed
    {
        return static::message(__('Invitation sent.'));
    }
}

Register it anywhere Nova accepts cards.

public function cards(NovaRequest $request): array
{
    return [
        new InviteUserCard(),
    ];
}

Documentation

Read the full documentation in docs/documentation.md.

Useful files:

Testing

composer install
vendor/bin/pest

License

Nova Form Card is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固