Closed ChangChiLung closed 2 years ago
simply you can save it in your database or every thing you need. just pass it into an property sample:
->onProgress(function ($percentage, $remaining, $rate) {
var_dump($percentage);
//this method used to prevent too many query (10 percent steps)
if ($percentage - $this->start_progress >= 10 || $percentage > 90) {
$this->start_progress = $percentage;
$this->queueProgress($percentage);
$this->video->update([
'progress' => [
'percentage' => $percentage,
'remaining' => $remaining,
'rate' => $rate,
],
]);
}
})
Hi, Pascal..
I'm struggling for weeks to find out how to get
onProgress
value and then show it in myindex.blade.php
page. When iecho $percentage
and run the Job with Artisan Command i can see the value updated in my Command Prompt, but, how to grab it and show it to my index page? I'm searching for any tutorials out there, but found nothing usefull enough.I use Vue.js (should i use JQuery AJAX?) & Laravel 8 Job Batch, here is my Job's code: ` **class ConvertVideo1440p implements ShouldQueue { use Batchable, Dispatchable, InteractsWithQueue, Queueable, SerializesModels; public $video;
}** ` Can you PLEASE make some tutorial about it in YouTube just like before?
I'm just a Crazy NewBie who dreams to be the next Toni Sparkz and i'm really stucked up right now.. Please help me, Pascal.. Thanks before...