This is a Nova Card containing a Progress Bar
This package allows you to add progressbar cards to your resources and dashboards in Nova.
This package is still work in progress. Feel free to help improve it.
Just run:
composer require razorsheep/nova-progressbar-card
After this the setup will be complete and you can use the components listed here.
// in App\Nova\Product
...
use Razorsheep\Nova\Cards\ProgressBar\ProgressBar;
...
/**
* Get the cards available for the request.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function cards(Request $request)
{
return [
(new ProgressBar)->options(['title' => 'Translations', 'percentage' => 0.5]);
];
}
public function cards(Request $request)
{
return [
(new ProgressBar)->options([
'title' => 'Translations',
'percentage' => 0.5,
'color' => '#123456',
]);
];
}
public function cards(Request $request)
{
return [
(new ProgressBar)->options([
'title' => 'Translations',
'percentage' => 0.5,
'colorFrom' => '#aaa',
'colorTo' => '#bbb',
'animateColor' => true,
]);
];
}
public function cards(Request $request)
{
return [
(new ProgressBar)->options([
'title' => 'Translations',
'percentage' => 0.5,
'strokeWidth' => 8,
]);
];
}
public function cards(Request $request)
{
return [
(new ProgressBar)->options([
'title' => 'Translations',
'percentage' => 0.5,
'type' => 'semi-circle',
]);
];
}
Feel free to come with suggestions for improvements.