1. Go to this page and download the library: Download haythem/progress-bar library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
haythem / progress-bar example snippets
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.
];
}