You can install this package in a Laravel app that uses Nova via composer:
composer require demency/pulse-field
Add the following code in your own resource implementation:
<?php
...
class YourResource extends Resource {
...
public function fields(Request $request)
{
// Replace this variable with your own trend.
$trend = (new YourOwnTrendClass());
return [
...
// Are you ready?
// --------------
// 1. Add field implementation.
// 2. Set trend instance as meta.
// 3. Use first range or specify directly the range.
Pulse::make(__('Pulse'), 'id')
->withMeta([
"trend" => $trend,
"range" => array_key_first($trend->ranges()),
"title" => __("Executions")
]),
];
}Readme not found. Refer to the project website: https://github.com/demency/pulse-field
| Added | 6 years ago |
| Last updated | 5 Years Ago |
| Version | 1.3.0 |
| Nova Version | ^2.0|^3.0 |
| Composer | |
| demency/pulse-field | |
| GitHub stars | 2 |
| Packagist downloads | 204 |