chinleung/nova-autofill
最新稳定版本:v1.1.2
Composer 安装命令:
composer require chinleung/nova-autofill
包简介
Autofill values for Laravel Nova fields based on the parent model on creation.
关键字:
README 文档
README
Auto prefill values for Laravel Nova fields based on the parent model.
Installation
You can install the package via composer:
composer require chinleung/nova-autofill
Usage
If your model has a relationship, it can autofill some values when adding via a relationship in Laravel Nova. For instance, an order that belongs to a user, you can autofill the user's address when adding a new order via the user resource.
public function fields(Request $request) { return [ Text::make('Shipping Address Line 1') ->autofill(), ]; }
If no attribute is passed in the method, it will use the field's attribute name to fetch from the parent resource. However, you can specify the attribute to fill from:
public function fields(Request $request) { return [ Text::make('Shipping Address Line 1') ->autofill('address_line_1'), ]; }
Security
If you discover any security related issues, please email hello@chinleung.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 13.22k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-10-18