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.
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, andSparkline
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
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-10
