lifeonscreen / nova-belongs-to-badge
A Laravel Nova belongs to badge field.
Installs: 4 701
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 1
Open Issues: 2
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2024-10-21 01:19:17 UTC
README
Simple Laravel Nova BelongTo Badge field. It extends the BelongsTo fields and displays badge on Index and Details page.
Details page
Example of badge in detail page:
Index page
Example of badge in index page:
Installation
Via Composer
$ composer require lifeonscreen/nova-belongs-to-badge
To create migrations witch adds colors to your tables you can run:
$ php artisan make:migration:add-badge-colors {tableName}
Usage
Add this to Field list:
BelongsToBadge::make('Status', 'status', Status::class),
Field will read colors from badgeBackgroundColor
and badgeForegroundColor
attribute.
Security
If you discover any security-related issues, please email the author instead of using the issue tracker.
Credits
License
MIT license. Please see the license file for more information.