haythem / progress-bar
A Laravel Nova field.
Installs: 718
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:Vue
Requires
- php: ^7.3|^8.0
README
Package Description: A dynamic progress bar field for laravel nova
Installation
Install via composer
composer require haythem/progress-bar
Setup route
Route::get('/progressbar', function () {
return ["percentage" => rand(0, 100), "show" => true];
});
Usage
use Haythem\ProgressBar\ProgressBar; public function fields(Request $request) { return [ ProgressBar::make('Progress Bar') ->endPoint('/api/progress') ->callEvery(500) ->markAsDone(false) ->barColor("#FFC0CB") ->barBackgroundColor("yellow") ->textColor('pink') ->initLabel("please wait") ->processingLabel("processing") ->doneLabel("all is good") ->redirectWhenItsDone("https://www.google.com",true) //second parameter is optional to open the url in new tab or in the same tab. ->reloadWhenItsDone() ->showProgressBarInForms(true) // you can show progress bar in forms. ->animation(),//show three dots animation when initializing and processing. ]; }